A little while ago I asked about the jqrid in turbogears. I have now got
it serving basic data after following some strict guidelines.

The next thing is filtering. If I type something into one of the columns
I can see the words being passed backed to the json-sending function but
unsure how to parse it.

**kw of the json function gets the following:
'filters': 
u'{"groupOp":"AND","rules":[{"field":"Type","op":"bw","data":"GGG"}]}'}

ok so its a filter, looking for "GGG" in the column "Type".
How do I make that into something sqlalchemy understands?
  filter(model.Blah.Type == "GGG")

Also is there a way to "pre-filter" a grid? Imagine a parent/child model
and on the parent screen i want to show a grid with only its children.
I could fudge it with postData : { 'Parent': 123 } in the grid options
and then make the json function look for it but is there a better way?

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