Skip to content
Browse files

Fix posting correct sortname when index not set in the model

1 parent 25d77bd commit 57b758590f2fdb205345635fdef1c7de040fc5d7 @tonytomov committed Jun 27, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 js/grid.base.js
  2. +1 −1 js/grid.custom.js
View
2 js/grid.base.js
@@ -1882,7 +1882,7 @@ $.fn.jqGrid = function( pin ) {
$("tr th:eq("+idxcol+") span.s-ico",thd).show();
}
}
- index = index.substring(5);
+ index = index.substring(5 + ts.p.is.length + 1); // bad to be changed!?!
ts.p.sortname = ts.p.colModel[idxcol].index || index;
so = ts.p.sortorder;
if($.isFunction(ts.p.onSortCol)) {if (ts.p.onSortCol.call(ts,index,idxcol,so)=='stop') {ts.p.lastsort = idxcol; return;}}
View
2 js/grid.custom.js
@@ -53,7 +53,7 @@ $.jgrid.extend({
var sort = $t.p.colModel[idx].sortable;
if ( typeof sort !== 'boolean' ) { sort = true; }
if ( typeof reload !=='boolean' ) { reload = false; }
- if ( sort ) { $t.sortData("jqgh_"+$t.p.id+"_"+colname, idx, reload, sor); }
+ if ( sort ) { $t.sortData("jqgh_"+$t.p.id+"_" + colname, idx, reload, sor); }
}
});
},

0 comments on commit 57b7585

Please sign in to comment.
Something went wrong with that request. Please try again.