Forum
16:44
23/08/2011
The alternating rows style class isn't applied correctly after the first page.
For example if the number of rows is 10 then row 10 (last row of first page) and row 11 (first page of 2nd page) will have the same style.
The fix seem to be in addXmlData/addJSONData (grid.base.js).
Near the beginning of addXmlData:
if($.isXMLDoc(xml)) {
if(ts.p.treeANode===-1 && !ts.p.scroll) {
emptyRows(t,false, true);
rcnt=1;
} else { rcnt = rcnt > 1 ? rcnt :1; }
} else { return; }
The fix is to change it to:
if($.isXMLDoc(xml)) {
if(ts.p.treeANode===-1 && !ts.p.scroll) {
emptyRows(t,false, true);
rcnt=1;
} else { rcnt = rcnt % 2; } // } else { rcnt = rcnt > 1 ? rcnt :1; }
} else { return; }
(the fix to addJSONData is very similar)
This way it isn't just setting rcnt to 0 for the first page and 1 from the 2nd page onwards. Instead it will set it to 0/1 depending on whether rcnt is odd or even. (Given that the number of rows on a page should usually be even it should be 0 though).
Most Users Ever Online: 715
Currently Online:
35 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