I’m using jqgrid to access a tastypie API. I’ve changed sidx to “order_by” to match the default tastypie API.
Jqgrid passes the order_by (formerly sidx) get parameter regardless of whether it’s ordering by something or not. If it is not sorting, it just passes an empty string as the sort critiera. tastypie freaks out at an empty string saying that “There is no field named ” “
The way I see it, there’s two options to solve:
- Have jqgrid stop sending the order_by param unless it needs to
- Have tastypie ignore an empty order_by string…
Any suggestions on how to do either of those two things?
I am not sure, that I full understand the problem. First of all to rename
sidxtoorder_byone can useIf you never will that
sidxororder_bywill be send you can useYou can implement some scenarios in changing the
prmNames.sortdynamically. You can use jqGrid callbacks or events.One more way to control the list of parameters which will be sent to the server is
serializeGridDatacallback. For exampleSee the answer for another example.