views:

231

answers:

1

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?

+1  A: 

I am currently using the following CSS:

#gbox_MyGrid .s-ico span {
    display:none;
}

For a grid with an ID of MyGrid.

AaronSieb
Cool, so this solved your problem, then?
Justin Ethier
@Justin It works :) I'm still on the lookout for a more direct solution, if one appears before I'm allowed to select my own answer.
AaronSieb