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
Stack AJAX Results
06/10/2008
19:33
Avatar
las111
Member
Members
Forum Posts: 6
Member Since:
05/10/2008
sp_UserOfflineSmall Offline

Greetings,

First, thanks for all of the great work!

Using the following code to load any number of AJAX request's what is the optimal method to preserve grid results from previous requests? Does jqGrid provided a property to reloadGrid but preserve current grid contents? I read the documentation and Demos but addRowData didn't seem to be a good fit especially when the AJAX request returns multiple rows. The code below handles the multiple rows wonderfully but clears the grid each time a new request is made.

// construct the url for the AJAX request           
                var newUrl = "../Controllers/GridController.aspx?type=ajax&operation=pop_Grid&term=" + term + "";
               
                // now set the grid's AJAX request url and reload the grid
                $("#searchDetailsGrid").setGridParam({url: newUrl}).trigger("reloadGrid");

Thanks again              

07/10/2008
09:04
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

var mypostdata  = $(”#searchDetailsGrid”).getGridParam('postData');

$(”#searchDetailsGrid”).setGridParam({url: newUrl,postData:mypostdata

}).trigger(”reloadGrid”);

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.

30/09/2009
08:52
Avatar
las111
Member
Members
Forum Posts: 6
Member Since:
05/10/2008
sp_UserOfflineSmall Offline

I know this is a bit of an old thread but it seemed logical to post my question here.

 As far as preserving the original query terms the above works great. I am wondering about the recommended way to actually preserve the contents of the grid (and related changes) between queries. The above method just refreshes the current data but destroys any changes to current data.

 I guess I am looking for a way to practically append new rows.

Thanks,

Lee

03/10/2009
03:02
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

After this request you can go back to original values using the same approach

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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 994

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