On Tue, 8 May 2007 at 11:41, Jim Steil wrote: > What I want to be able to do is click on the Plant column header and > have it sort by the plant 'Name'. Is there a way to do this with the > DataGrids, or am I just asking for too much? Do I need to setup JOINs > in my SQLObject select? Any input would be appreciated.
You may be asking too much :) In the SQL table backing Requisition, there is no column 'plant'. Instead there is a column...plantID, I think...that contains the foreign key. You could sort on that column, but that probably wouldn't do you any good since you want to sort on plant name, not its arbitrary SQLObject id. Others will have to help you figure out how to do what you want. When I had a case like this I resorted to pre-sorting in python, but that doesn't quite apply to your case since most of the columns work fine for you using sql sorting.... A JOIN might be the right answer but I don't have any experience with setting up something like that. --David --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

