jQgrid Pagination with query string

Posted by bsreekanth on Stack Overflow See other posts from Stack Overflow or by bsreekanth
Published on 2010-06-10T05:39:55Z Indexed on 2010/06/10 5:42 UTC
Read the original article Hit count: 1222

Filed under:

Hello,
I recently started experimenting with jQgrid, and much appreciate for any guidance on the below use case. I need to implement a (advanced)search functionality, and the results are loaded in the jQgrid. When use pagination, how to specify a complex query in the post data? In the serverside (grails) it it represented as an object, which is mocked below

class searchCommand {
 String val1
 List<long> ids //from the multiple selection
}

the above members can be null, if the user doesn't select any. Without saving the state at the server, I guess the only way to make the pagination work is to pass the query object back and forth with the correct offset, index etc.
if that is the case, how best to represent it in jQgrid side. I saw a parameter postData to set additional values, but not sure how to represnt the data (JSON??). Any code snippet on (retaining) converting it from the last result to postData would be helpful.

thanks in advance.

© Stack Overflow or respective owner

Related posts about jqgrid