On Mon, Feb 23, 2009 at 12:10 AM, Sanjiv Singh <[email protected]> wrote:
>
> Forget to mention one more thing. You have to add a py:choose/py:when/
> py:otherwise block inside the for loop to have the link only for the
> intended column :)
Is there an example how to subclass the datagrid?
from tw.forms import DataGrid
class mydatagrid(DataGrid):
......now what?
Thanks,
Lucas
>
> Sanjiv
>
> On Feb 23, 11:00 am, Sanjiv Singh <[email protected]> wrote:
>> Hi Lucas,
>>
>> One way would be to subclass DataGrid and modify the template to have
>> something like this for the column
>>
>> <td py:for="col in columns"><a href="/some/path/${some_tmpl_var}">$
>> {col.get_field(row, displays_on='genshi')}</a></td>
>>
>> regards
>> Sanjiv
>>
>> On Feb 22, 3:24 am, Lukasz Szybalski <[email protected]> wrote:
>>
>> > On Wed, Jan 28, 2009 at 7:52 PM, Michael Pearce <[email protected]>
>> > wrote:
>> > > Hi,
>>
>> > > I'm trying to display a DataGrid widget using Genshi templates, and I
>> > > want
>> > > one of the fields to be a <href> link. I have successfully tried the
>> > > tutorial using Kid templates, which creates a link using the Kid Element
>> > > object and passes it to the DataGrid, however I can't find an example for
>> > > Genshi. I have looked through the documentation and unable to find an
>> > > equivalent Genshi object for creating a <href> link for my grid. Can
>> > > someone
>> > > please point me in the right direction.
>>
>> > Were you able to do it?
>> > Could you post a code that does it.
>>
>> > Thanks,
>> > Lucas
> >
>
--
How to create python package?
http://lucasmanual.com/mywiki/PythonPaste
Bazaar and Launchpad
http://lucasmanual.com/mywiki/Bazaar
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---