On 13 June 2012 20:35, Cornelius Kölbel <cornelius.koel...@lsexperts.de>wrote:
> Hi there, > > I think I found a missing feature and thus got a feature request for the > sqlform.grid und thus for the sqlform. > I tried to take a look into the code and I think it is not possible. I > am using version 1.99.7. > > I'd like to a a link to any abitrary column. Let's say I got a table > > | head1 | head2 | head3 | > ---------------------------------- > | col1 | col 2 | col 3 | > | col1 | col 2 | col 3 | > | col1 | col 2 | col 3 | > > and I'd like to make e.g. col1 a link in each row. > > Is this possible? > Would I need some newer release? > Where would I need to pass the patch? > > If you don't want to use the 'links' option in SQLFORM.grid you can use the .represent feature to do what you want to do are aiming to do in the above example. Here is an example I am using: self.db.akb_country.id.represent = \ lambda id, record: A('edit', _href = URL(r = self.request, c = 'default', f = 'edit_akb_country', args = str(id))) Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)