Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
virtual scrolling - alternating rows / zebra strips out of synch after first page
26/08/2011
16:44
Avatar
de
Member
Members
Forum Posts: 9
Member Since:
23/08/2011
sp_UserOfflineSmall Offline

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).

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
29 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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information