I've hit another little speed-bump with the jqgrid in the admin screens.
Say you have two tables, Parent and Child with a relationship between
them. One column I want to show is Parent.child and this works fine (the
trick is to use __possible_field_names__ set to whatever you want
to see from the child, in my case the column called display_name

Anyhow that bit works, I can see my grid filled with things, I click
on the id or name of the parent and the json call changes the sidx
field in the url (sord index) to "id" or "name".

When I click child, I'd want to sort the rows by child name, the call
back to the json url is sidx=child which is sort-of right from the
grid's point of view. The backend (TableFiller) gets a SQLA error
because child is not a real column in parent, its a relationship.

Now, outside tgext.crud I would of probably hand-crafted a join to bring
in the Child table and made the order_by Child.display_name but I cannot
see how it is done within this object.

It's probably a bigger thing than a jqgrid problem, can you make direct
json calls to tgext.crud and sort on these child fields?

 - Craig
-- 
Craig Small VK2XLZ   http://enc.com.au/          csmall at : enc.com.au
Debian GNU/Linux     http://www.debian.org/      csmall at : debian.org
GPG fingerprint:     5D2F B320 B825 D939 04D2  0519 3938 F96B DF50 FEA5

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/turbogears?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to