Forum
09:11
11/01/2014
Greetings, please, before respond to the pagination of the grid, read what I'm looking for, it is not the normal pagination.
I have a table in my database with more than 10.000 registers, when I load the data into the grid, the page load turns very slow. If I load the entire data (more than 10.000 of registers) and I use "pager" and "rowNum", fine, the grid page the rows.
But what I want to do is load from 30 to 30 rows, but I dont want to load the entire rows (the 10.000) once. I was using the event "onPaging" and I send to the server "rowNum", "page", "sortname" and "sortorder", using the function " jqGrid('getGridParam', "page") ". I receive the parameters in the server and execute the sql that returns the "rowNum" of registers, depends of the page.
The problem is that in the load of the grid, I load just 30 rows, because rowNum=30 and page=0, so the sql give me the 30 first registers. it is good because load fast, but the pager doesnt work, becuase I'm loading just 30 registers, instead of the 10.000.
So, my question is, ¿ anyone have an idea to tell the grid the total rows that I have in the database, even if I load just 30 rows in page load ?, in that way the grid will page the rows, and in the "onPaging" event I handle what registers I return and show.
16:29
Moderators
30/10/2007
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:
70 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