Forum

July 12th, 2025
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
Need pager to send start row instead of starting page
11/02/2011
09:10
Avatar
mmelson
New Member
Members
Forum Posts: 2
Member Since:
11/02/2011
sp_UserOfflineSmall Offline

I'm connecting jqgrid to json that is being output from SOLR which deals only in records and has no concept of pages.

How can I intercept a paging request for more data & modify the start query arg?

For example, if my data has 100 records total & 10 records on a page, using the pager to go to page2 sends a GET with start=2. I need to change that to start=20.

Thanks!

11/02/2011
18:24
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hello,

you can use serializeGridData event handler. It is a function which receive as an object the object which build the url parameters like {page:2,rows:10, ...}. You can use the input and construct another object like {start:20,rows:10, ...} and return the object from the serializeGridData event handler. In the way the new parameter will be send to the server instead. I hope this explanation will be enough for you to construct the url parameters which you need.

Best regards
Oleg 

11/02/2011
19:16
Avatar
mmelson
New Member
Members
Forum Posts: 2
Member Since:
11/02/2011
sp_UserOfflineSmall Offline

Thank you Oleg!

That works perfectly.

serializeGridData: function(postData) {

  postData.start = postData.start * postData.rows;

  return postData;

}

Forum Timezone: Europe/Sofia

Most Users Ever Online: 994

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