On Jan 4, 8:03 pm, "Jim Steil" <[EMAIL PROTECTED]> wrote:
[snip]
Is there a way for me to ask the DataGrid to make the columns sortable by
clicking on the heading?  I apologize if this doesn't make any sense, I
really don't know how to describe it any better.

DataGrid doesn't support sorting by default. You would need to extend
it with some javascript to do so. Check out

http://mochikit.com/examples/sortable_tables/index.html

for an example of how you might do it with MochiKit. If you're just
sorting strings, its straight forward. If you want to sort by number or
date types, you'll need to use use DataGrid.Column objects in your
fields parameter to specify extra type information.

e.g.
pgFields = [DataGrid.Column('Product Group',
                                              makeProductGroupLink,

options=dict(type='str')),
                 DataGrid.Column('Name',
                                             'name',

options=dict(type='str'))  ]

HTH


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