I’m looking for solution which gives ability to disable column sort in
jqGrid table after creation, is that even possible? how to do that?
Problem in depth:
First I defined a jqGrid and then offer to pick up some filter fields and then return data regarded to chosen filters, code will looks like this
jQuery("#gridtable").jqGrid('setGridParam',{url:"/getUsers/?site="+site+",page:1}).trigger("reloadGrid");
$('#results').show();
so need something regarded if site have been picked up or not to allow sorting on id column, or disable sorting on “id” column.
jqGrid bind
clickevent handler on every sortable column header to a function which sort the data. To disable column sorting on a column you can unbind theclickevent. If you have column with the name ‘colName’ for example and the grid with id=”list” the id of<th>element (the column header) will be “list_colName”. So to disable the sorting you can do the following:The last line set additionally default cursor on the column header to show more clear that the column is not sortable.