Вопрос

I would like to know if there is a way to add extra parameters to the sort call. When I click on a jQGrid column in order to sort (asc or desc) a row, I would like to know if there is a way to add extra parameters in order to be able to customize my order on server side basing in passed parameters. Because, every time I click to order by a column, when I reach the server I dont know if the call is from a sort event or from a load event, and I have to know it to make diferents querys.

thanks

Это было полезно?

Решение

You can use the onSortCol event to modify the postdata of the grid to send an additional flag

Alternatively, you know the default sort column and sort order that you set in the grid object. You could just check in the backend to see if the sidx and sort parameters are different from the defaults.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top