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
ReloadGrid Trigger without Clear Filter
18/11/2009
09:10
Avatar
Klaus
Member
Members
Forum Posts: 68
Member Since:
18/11/2009
sp_UserOfflineSmall Offline

I'm looking for a method to reload the grid data (from server) without clearing any set search-filters!

The documentation of the refresh-button in the navigator controls says:

"Enables or disables the refresh button in the pager. When the button is clicked a trigger(“reloadGrid”) is executed and the search parameters are cleared"

Is there any attribute I can define when calling the reloadGrid-method to preserve the search parameters?

Or is there any other method which I can use?

Kind regards,

Klaus.

19/11/2009
05:22
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

This is partial true. Actually we do not clear the search parameters, but turn the search flag to false. This mean that the search parameters are in the postData object and you can use them.

Here is a trick - you can use the afterRefresh event to turn on the search to true.

...jqGrid('navGrid',{

afterRefresh : function() {

("#mygrid").jqGrid('setGridParam',{search:true});

},

...}...);

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.

19/11/2009
06:00
Avatar
Klaus
Member
Members
Forum Posts: 68
Member Since:
18/11/2009
sp_UserOfflineSmall Offline

Hello Tony!

I've tried your hint, but that doesn't solve my problem.

The search-parameters seem to be cleared on clicking the refresh button.

1) select a filter and click find ...
POST http://localhost/htmlclient/se.....server.dll
 {"_search":true,"nd":1258631399957,"rows":25,"page":1,"sidx":"name","sord":"asc","searchField":"status","searchString":"connected","searchOper":"eq"}

2) then close the dialog and click the refresh button
POST http://localhost/htmlclient/se.....server.dll
 {"_search":false,"nd":1258631405494,"rows":25,"page":1,"sidx":"name","sord":"asc","searchField":"","searchString":"","searchOper":""}
"afterRefresh"-event called (log output)

It seems that the afterRefresh event is called too late for this purpose.

I've tried to set the _search-field on the postdata of the serializeGridData function, but the search-fields are already empty.

Do you have another hint for me?

Kind regards,

Klaus

19/11/2009
06:05
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Uppss, sory for this. Right now I look into the code and we call resetFilters which clear the serch's. Should be added soon.

Sorry again.

Also one possible solution is to add a custom Button and then you can control evrething.

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

19/11/2009
06:14
Avatar
Klaus
Member
Members
Forum Posts: 68
Member Since:
18/11/2009
sp_UserOfflineSmall Offline

Thank's for the quick answer.

Is there another method or trigger-function I can call to only reload the grid without invoking any cleanup-tasks?

(why I need this? ... I would like to trigger an automatic reload of the table data periodically)

Kind regards,

Klaus.

21/11/2009
06:02
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

As we say in the docs - trigger("reloadGrid) - reloads the grid with the current parameters just asking again for data with the last settings in postData.

Best 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: 715

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