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
Clearing search results after closing search toolbar
08/11/2008
13:03
Avatar
Robert
Member
Members
Forum Posts: 8
Member Since:
04/11/2008
sp_UserOfflineSmall Offline

I apologize for all the questions.

I am using the multisearch toolbar in a way identical to the demo.  When I close the toolbar (by clicking on "Search" again, I'd like the search results to be cleared and all items to be displayed.

I've tried the following where the onClickButton toggles the visibility of the search bar:

jQuery("#t_list").css("display","none"); // original code

jQuery("table.filtertable td > input").val(""); // these lines added
jQuery("#sg_status").val("All");
jQuery("#t_list").filterGrid("list", {gridModel:true, filterModel:false}).triggerSearch();

...and while this clears all results from the search boxes, the request it sends to the server still contains the previous search query.  Using .clearSearch() doesn't seem to do anything either.  Any hints as to how to make a blank query (or query of "_search=false") be sent to the server so that I can have all items re-appear?

Thanks in advance,

Robert

10/11/2008
07:29
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

How do you call clearSearch - do you have read the docs?

Also to have succes with clearSerach

you should

var cs = jQuery("#filter")[0];

cs.clearSearch();

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.

10/11/2008
17:21
Avatar
Robert
Member
Members
Forum Posts: 8
Member Since:
04/11/2008
sp_UserOfflineSmall Offline

Thanks, Tony.  I had tried something quite similar to that, but I didn't have the [0] at the end.  It works good now.

Kind regards,

Robert

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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