Forum
11:40
28/05/2010
Description of the problem in http://www.trirand.com/blog/?p.....work-well/
I've found the problem, the problem is that when the data loadcompleted, i set the datatype:local and sort for a column, then ts.p.lastsort remembered this column.
After i set the datatype:json and reload the grid the ts.p.lastsort is also exist,so it will not re-sort this out but the implementation of the reverse.
So i add code in grid.base.js at line 1514 "ts.p.lastsort = null;", problem solved.
bind('reloadGrid', function(e, opts) {
if (ts.p.treeGrid === true) { ts.p.datatype = ts.p.treedatatype; }
if (opts && opts.current) {
ts.grid.selectionPreserver(ts);
}
if (ts.p.datatype == "local") { $(ts).jqGrid("resetSelection"); }
else if (!ts.p.treeGrid) {
ts.p.selrow = null;
ts.p.lastsort = null;
if (ts.p.multiselect) { ts.p.selarrrow = []; $('#cb_' + $.jgrid.jqID(ts.p.id), ts.grid.hDiv).attr("checked", false); }
ts.p.savedRow = [];
if (ts.p.scroll) { emptyRows(ts.grid.bDiv, true); }
}
Most Users Ever Online: 715
Currently Online:
30 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66