jQgrid Pagination with query string
- by bsreekanth
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.