jqGrid - how to change title based on colModel sortable property
- by Greg
When the mouse hovers over each column I'd like the tooltip to indicate whether that column is sortable.
I am able to change the title attribute with something like this:
$("#List .ui-th-column").each(function(i) {
var isSortable = i % 2;
$(this).attr('title', isSortable ? "Not Sortable" : "Click header to sort.");
});
I'd like to replace the demo expression 'i % 2' with a check of the colMode's sortable property, but I can't figure out how to get the value of the colModel's sortable property.
colModel: [ { name: 'Name', index: 'Name', width: 100, sortable: true },
{ name: 'Note', index: 'Note', width: 200, sortable: false } ]
I've tried .getGridParam and .getColProp but I don't think the syntax I'm using is correct.