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_TopicIcon
Set total number of rows no traditional way
11/01/2014
09:11
Avatar
kurtjavier
New Member
Members
Forum Posts: 1
Member Since:
11/01/2014
sp_UserOfflineSmall Offline

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.

15/01/2014
16:29
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

You will need to check your server side code and what is returned from the server.

Usually you maybe not set some parameters correct in the response.

Look here in the docs  for the XML way.

Also look into the comments for the JSON.

Also you may need to look here

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.

Forum Timezone: Europe/Sofia

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

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

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information