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
Saving search criteria on the server
30/10/2009
07:26
Avatar
SimonL
Member
Members
Forum Posts: 39
Member Since:
23/07/2009
sp_UserOfflineSmall Offline

Hi,

I'm using the multisearch facility of the grid - which works very well. But I'm also trying to save the search criteria on the server, so that when the page is reloaded it gets the search criteria from the server and the grid is filtered as it was. Saving the criteria on the server is no problem. Retreiving criteria from the server is also no problem. But If I try to set postData with the setGridParam method, by the time it gets to the server side some values are overwritten, filters for examle. I've also tried setting postData in beforeRequest but I can't seem to get the javascript correct. When beforeRequest is fired I need to make a call to the server to see if there is any serach criteria set, if so I need to retrieve it and set postData, but I can't seem to get it right. The call to server method that populates the grid is called before my call to the server to check if there's any search criteria already cached there.

So first of all is what I'm trying to achieve actually possible, if so, can someone guide me in the right direction please.

This is my beforeReuest function:

    setGridPostData = function() {
                    var ClientState = { "stateType": "ClientState - Stock" };
                    $.getJSON(' ...someURL...', ClientState,
                        function(x) {
                            this.postData._search = true;
                            this.postData.page = x.page;
                            this.postData.rows = x.rows;
                            this.postData.filters = x.filters;
                   ....

             });
    }

Regards,

Simon

Forum Timezone: Europe/Sofia

Most Users Ever Online: 994

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