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
Page 1 of NaN in case of length of XML data is 0
Tags: pagerNaN
08/09/2011
22:12
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hello Tony,

in the past the same bug in case of XML data. The problem is very easy: the uninitialized variable rn is defined in the line 1086 of grid.base.js and it will be not set in case of gxml.length==0:

var gl = gxml.length, j=0, grpdata={}, rn;
if(gxml && gl){
    rn = parseInt(ts.p.rowNum,10); 

later in the line 1181 if will be used

if(locdata) {
    ts.p.records = gl;
    ts.p.lastpage = Math.ceil(gl/ rn);

For undefined rn the lastpage will be NaN.

To fix the problem one should just change the line 1086 to

var gl = gxml.length, j=0, grpdata={}, rn = parseInt(ts.p.rowNum,10);

The line 1088 which contains the same assignment can be removed.

Best regards
Oleg 

25/10/2011
13:40
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hello Tony,

the described bug is still not fixed in the jqGrid 4.2.0. Do you forget about this or do you think that it's not needed to fix the problem?

Moreover I think, that it would be very practical and simple to allow to use functions (metods) inside of xmlReader. The implementation will be simple enough, but it would gives the user the same power to read practically any XML data like one can do this with JSON data. The usage of attributes instead of elements to represent the value of columns can be also easy possible in the way.

What is your opinion about this?

Best regards
Oleg 

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
39 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