Hello!
On Jan 30, 2008 11:25 PM, Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
> You can pass a callable which will return the column-value. It gets passed
> the
> current row object, but that you can ignore. Something like this
> (untested):
>
> def compute_foo(row):
> return kid.XML("""<a href="#">foo</a>""")
> bookables_grid = vw.SortableDataGrid(name='bookables_grid', fields=[
> ('foo', compute_foo)
> ])
>
Yes, that helped a lot.
Thank you!
>
> > 2. The grid in question lists a couple of items. At the bottom I
> > would like to have an empty field and an 'Add' item, which allows
> > users to add another item to the list. I have that working so far.
> > Once added, the page is being redisplayed and shows one more item as
> > intended. But next to each item I would now like to display a list of
> > possible 'actions' (see point 1), one of them being 'delete' for
> > example. It appears to me that TG's form handling would expect the
> > button at the bottom to be pressed, though. Is there a way to have
> > multiple exits out of the form? One being the button, the other being
> > one of the action links next to each item?
>
> Yes, alter the above code to have the link contain all necessary
> parameters.
>
> Diez
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---