I'm in the beforeRequest handler, and would like to know what the current sort column is. How can I find that?
You can examine the values of the jqGrid parameters sortname
and sortorder
("desc" or "asc"). To get the parameters you can use getGridParam
method:
var sortColumnName = $("#list").jqGrid('getGridParam','sortname');
and
var sortOrder = $("#list").jqGrid('getGridParam','sortorder'); // 'desc' or 'asc'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With