Igor Foox schrieb:
> 
> On 27-Nov-06, at 2:50 PM, Diez B. Roggisch wrote:
> 
>>> So after a whole bunch of poking around I figured it out, and I'll
>>> probably be writing it up. Is there any particular place that I can
>>> submit a tutorial on how to use AjaxGrid to the docs?
>> I guess the Wiki is the appropriate place.
>>
>>> And also another related question about AjaxGrid. How do I set rows
>>> to be a link, or at the very least hang an 'onclick' action on them?
>>> There seems to be something possible with the 'actions' parameter to
>>> the grid, but it's not trivial to figure out from the code, and I'm
>>> wondering if its use is documented somewhere.
>>
>> I do it like this:
>>
>> import kid
>>
>>
>> def get_action(rowobject):
>>      return kid.XML("<a href="/whatever?id=%i">edit</a>" %  
>> rowobject.id)
>>
>> You pass that to the columnobject as getter.
> 
> I'm a bit confused here, what is columnobject in this instance?

Argl. I'm sorry, that was targeted towards the DataGrid widget. Sorry 
for causing confusion.

But I had a look into the sourcecode - so it appears that one can return 
actions to call in the json data. See widget.js - it looks somewhat more 
complicated than I can now parse without having a use case on my own.

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
-~----------~----~----~----~------~----~------~--~---

Reply via email to