Is it possible to hide or manipulate the jqGrid "sort" icons?
I have a custom, multi-column sort attached to my jqGrid instance by means of the onSortCol event:
onSortCol: function(index, iCol, sortorder) {
//Manipulate the sort order via custom code, and store it in postData.
return 'stop';
}
The problem I'm running into is that the sort icons in the column headers are falling out of synch 开发者_高级运维with the actual sorting, because their behavior is slightly different from what I'm trying to implement.
I've tried using setParam('sortname'...)
, but that specifically doesn't change the sort icon. I've also tried sortGrid
, but that raises the onSortCol event in a way that seems to be indistinguishable from a user's click.
If hiding via CSS is the only option, what's the most effective selector to target ONLY the sort headers in a specific grid?
I am currently using the following CSS:
#gbox_MyGrid .s-ico span {
display:none;
}
For a grid with an ID of MyGrid
.
I disable the sort for a particular column with 'sortable: false,' like below:
{ name:'ColumnName', index:'ColumnName', width: 80, sortable: false, align:'center'}
Good luck.
精彩评论