Forum
In version 4.5.2 (don't know about other 4.5.x versions), if you specify rowNum as a string (like "100" instead of 100), the specified number of records per page (rowNum) is not selected in the rowList drop-down. The grid still governs the specified number of records correctly, but no OPTION of SELECT.ui-pg-selbox is marked as selected, which leads to confusion whenever rowNum is not equal to rowList[0]. See screenshot for demo.
I know, it would be natural to dismiss it as a non-essential problem and simply suggest specifying rowNum as an integer. However, in all my applications I remember user settings (like number of records per page, current page, etc) in cookies. So, the problem is actually caused by the fact that getGridParam('rowNum') returns a string, not the integer (so "100" instead of 100), and this is what I store in the cookies and read/apply for the grid on next page visit. Before 4.5.x, it was never a problem because rowNum could be specified with a string with no side-effects. Not anymore.
19:30
Moderators
30/10/2007
Helo,
Thanks for this investigation.
As from 4.5 we make the comaparations more strong - i.e we replace == with ===.
In your case if you set rowNum as string you should set rowList array values as string.
Regards
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
19:37
Moderators
30/10/2007
Hello,
Also you can then get the rowNum this way
parseInt(getGridParam('rowNum'),10);
In your previous case the returned value is always string since the select box values (rowList) are strings when they are builded in the select, not in the array.
Regards
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
38 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