Is it possible to disable sorting in jqGrid for all columns instead of adding sortable: false
to each column in colModel?
To enable or disable the sorting of a Grid column, you can set its sortable property to false. In the code example below, the sorting of the "ShipName" column is disabled. });
The value of sidx parameter will be constructed from sortname option of jqGrid and the value of sord from sortorder . So you should do the following: $('#yourgrid'). jqGrid('setGridParam', {sortname: 'yourColumn', sortorder: 'asc'}).
This functionality was added in jqGrid 4.0+
After defining your colModel section in the jqGrid configuration, add the following:
cmTemplate: {sortable:false},
This will force all columns to no longer be sortable.
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