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
Accessing Search Filter
23/04/2010
23:33
Avatar
pjboettcher
Member
Members
Forum Posts: 3
Member Since:
23/04/2010
sp_UserOfflineSmall Offline

Is there a property or method that I can call to access the current search filter? I would like pass the filter to another object but after looking through the docs I don't see anyway to access it.

If anyone could give me any pointers that would be great.

Regards,

Peter

24/04/2010
08:10
Avatar
ddotsenko
Member
Members
Forum Posts: 15
Member Since:
08/03/2010
sp_UserOfflineSmall Offline

The question is a bit confusing / ambiguous, but it looks like you are trying to Get search / filter settings from the grid, if any is set.

If this is so, just look at grid.p.postdata object. Depending on which search / filter method was used (simple, multiple, tabbar) the settings will be laid out in different way. On top of that, if the format is different based on true or false on stringResult property set for the search.

Example of "multiple search" format is here:

/jqgridwiki/doku.php?id=wiki:advanced_searching

Hope this is a right start for your search.

26/04/2010
15:50
Avatar
pjboettcher
Member
Members
Forum Posts: 3
Member Since:
23/04/2010
sp_UserOfflineSmall Offline

Sorry if I wasn't clear. What I was looking for wasn't the search settings, but the actual search filter used. So for example a user might click the advanced search button and select some search criteria and click find. The data is then retrieved based on that filter. What I am trying to do is have a custom button that could be clicked that would get the search filter that was just used to get the data.

I was just wondering if there was a 'filters' property I could access that would give me the filters that are currently in use. I hope that is clear.

Thanks for your help.

Peter

26/04/2010
20:03
Avatar
ddotsenko
Member
Members
Forum Posts: 15
Member Since:
08/03/2010
sp_UserOfflineSmall Offline

Re:

I was just wondering if there was a 'filters' property I could access that would give me the filters that are currently in use. I hope that is clear.

That's what I meant in my earlier post: you don't need a "function" or a "property" The filter data is stored in the postdata property in the grid. Just read it directly ( take a look at $('#gtid_id')[0].p.postdata in FireBug after setting the filters ) or use the jqGrid plug in that reads postdata. 

26/04/2010
20:16
Avatar
pjboettcher
Member
Members
Forum Posts: 3
Member Since:
23/04/2010
sp_UserOfflineSmall Offline

Sorry, I didn't pick-up on the postdata part of your first post. Thanks again for your help. Smile

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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