diff --git a/js/grid.base.js b/js/grid.base.js index 33398732a..7b574ee3f 100644 --- a/js/grid.base.js +++ b/js/grid.base.js @@ -2208,14 +2208,21 @@ $.fn.jqGrid = function( pin ) { if(ts.p.lastsort === idxcol && ts.p.sortorder === sor && !reload) { return; } ts.p.sortorder = sor; } - var previousSelectedTh = ts.grid.headers[ts.p.lastsort].el, newSelectedTh = ts.grid.headers[idxcol].el; + var previousSelectedTh = ts.grid.headers[ts.p.lastsort].el, newSelectedTh = ts.p.frozenColumns ? obj : ts.grid.headers[idxcol].el; $("span.ui-grid-ico-sort",previousSelectedTh).addClass('ui-state-disabled'); $(previousSelectedTh).attr("aria-selected","false"); + if(ts.p.frozenColumns) { + ts.grid.fhDiv.find("span.ui-grid-ico-sort").addClass('ui-state-disabled'); + ts.grid.fhDiv.find("th").attr("aria-selected","false"); + } $("span.ui-icon-"+ts.p.sortorder,newSelectedTh).removeClass('ui-state-disabled'); $(newSelectedTh).attr("aria-selected","true"); if(!ts.p.viewsortcols[0]) { if(ts.p.lastsort !== idxcol) { + if(ts.p.frozenColumns){ + ts.grid.fhDiv.find("span.s-ico").hide(); + } $("span.s-ico",previousSelectedTh).hide(); $("span.s-ico",newSelectedTh).show(); }