Forum
08:41
Moderators
30/10/2007
Hello,
Why do you think so? Do you try to define page and totals in json string?
Just for your info there is no difference in jsonstring and JSON response in jqGrid - the are treated the same way.
Kind Regards
Tony
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.
23:39
Moderators
30/10/2007
Hello,
Not sure what you mean. locdata just determine that the localdata arry should be filled in order to be used into the future.
Just few rows bellow we have
addJSONData = function(data,t, rcnt, more, adjust) {
........................
locdata = (ts.p.datatype != "local" && ts.p.loadonce) || ts.p.datatype == "jsonstring";
..................
ts.p.page = $.jgrid.getAccessor(data,dReader.page) || 0;
lp = $.jgrid.getAccessor(data,dReader.total);
ts.p.lastpage = lp === undefined ? 1 : lp;
ts.p.records = $.jgrid.getAccessor(data,dReader.records) || 0;
....
}
Kind 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.
10:50
02/08/2010
Hi,
yes, but then comes this:
...................................................................................
drows = $.jgrid.getAccessor(data,dReader.root);
if (drows) {
len = drows.length; i=0;
.....................
if(locdata) {
ts.p.records = len;
ts.p.lastpage = Math.ceil(len/ rn);
}
....................................................................................
ts.p.records is the length of drows, and not what I have defined in dReader.records.
Do you know, what i mean?
Kind regards
16:01
10/08/2009
Hi Taker!
The datatype "jsonstring" is a form of holding of the local data in jqGrid where you load all the data in once. So having the number of records or the number of pages which not corresponds the data from the JSON string has no sense. If you want use data paging for example, you should use "json" data type.
It seems to me it would be better if you post a code example where you show in which situation you have the problem which you describe. Then one could change your code so, that the problem no more exist.
Regards
Oleg
Most Users Ever Online: 715
Currently Online:
72 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