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
filterGrid: initialize filter model
24/12/2008
07:58
Avatar
cage
Member
Members
Forum Posts: 15
Member Since:
31/03/2008
sp_UserOfflineSmall Offline

Hi,

I use the filterGrid with the filterModel and the type of the columns is 'select'. This work fine.

Between two reload of the data, I would like to  change the values of the select with new values, but this seem no be possible. The model keep always the first values.

Is there a way to empty the values fixed with the first call of filterGrid ?

Thanks and Merry Christmas

Gerard

29/12/2008
03:23
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

You can use afterSearch event (see docs) something like

// I suppose you name for the select is myselect

afterSearch : function () {

jQuery("select[@name=myselect]","#filterelem").empty();

// here your code to add new options.

}

Regrds

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.

29/12/2008
11:17
Avatar
cage
Member
Members
Forum Posts: 15
Member Since:
31/03/2008
sp_UserOfflineSmall Offline

Thank's Tony.

I always have a problem.

There is a form with a grid, input fields and submit button to select the content of the grid.

Inside the grid there are select boxes to filter rows

On submit action, I use setPostDataItem to fix criteria with content of input fields and then trigger("reloadGrid"). That's OK.

On loadComplete, the select boxes are filled with new values. That's ok

But if there was a filter selected before use submit, the select value is transmitted and I don't obtain the correct data.

If I try using clearSearch() before use setPostDataItem and trigger("reloadGrid"),  the additional criteria fix with setPostDataItem are not sended.

Is there a solution ?

Thanks

Gerard

31/12/2008
10:26
Avatar
cage
Member
Members
Forum Posts: 15
Member Since:
31/03/2008
sp_UserOfflineSmall Offline

Hi,

finally I used the afterClear event.

All is fine now

Good evening

06/01/2009
03:57
Avatar
cage
Member
Members
Forum Posts: 15
Member Since:
31/03/2008
sp_UserOfflineSmall Offline

Happy new year,

unfortunately the precedent solution seem not work properly !

Have you an idea ?

Thanks

08/01/2009
07:55
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

I think there is a simple solution for this. Just emty the div where you create the filterGrid and construct it again with a new one with the desired select values, after two reloads.

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:
41 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