Forum


10:07

01/04/2010

Hi,
first of all thank you for this great grid!
I got a little problem with it though. I created a search toolbar and the first field is a select field (dropdown) generated with a query in mysql.
The problem is this:
I click a button outside the grid (but in the same html page of the grid) and I need the grid to filter using a defined value.
I'm able to do that in this way:
MyGrid.jqGrid('setGridParam',{url:"elenconegozi.php?idquery=1&idcat="+idcat,page:1});
MyGrid.trigger('reloadGrid');
but the dropdown select does not change the value to match the filter.
How do I set the value of the dropdown searching field to match the filter?
Thank you very much for the assistance.
16:43

Moderators
30/10/2007

Hello,
trigger("reloadGrid") trigger the grid with the current settings (parameters) without to care what is in the toolbar.
For this purpose you should:
1. Either obtain the vaule from the select and set it to the url (not recommended)
2. Or to use triggerToolbar build in method (recommended) to do the job. It is important to note that triggerToolbar is not called with the standart methods. See her how to use them:
http://www.trirand.com/jqgridw.....al_methods
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.
Most Users Ever Online: 715
Currently Online:
39 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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66