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_Related Related Topics sp_TopicIcon
force a toolbar search?
07/09/2010
00:06
Avatar
mchahn
Member
Members
Forum Posts: 5
Member Since:
24/08/2010
sp_UserOfflineSmall Offline

I want to fill out the filter toolbar from my code and then force a search, just as if the user had pressed enter.  I've written code that fills out the input text boxes.  It works fine, but I can't figure out how to get the search to happen.  He is my code to fill out the boxes:

function setGridSearchFields($grid, valueMap) {

    var $inputs = $('#gview_' + $grid.attr('id')) .find('.ui-search-toolbar') .find('input').val('');

    for(var name in valueMap)

        $inputs.filter('[name="'+name+'"]').val(valueMap[name]);

}

I thought maybe I could fill out the boxes and then send extra params with a normal reload, but I can't get either the postData or userData options to work.  BTW: What is the difference between postData and userData?

07/09/2010
11:32
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Look at my http://stackoverflow.com/quest.....27#3337327 and http://www.trirand.com/blog/?p.....sensitive/.

I hope after examin this examples you could impement what you want.

To your other question. Parameter postData is very usefull if you want send additional information from the client to the server. For example url: "http://my.com/Svc", postData: {country: "Germany", langage: "german"} in case of HTTP GET requests follow to usage of url like http://my.com/Svc?country="Germany"&langage="german". In case of HTTP POST request the data from postData will be placed to the HTTP body.

Usage of userData is a standard way to send an additional information from the server to jqGrid (see /jqgridwiki/doku.php?id=wiki:retrieving_data#user_data). jqGrid knows the parameter and save tha data as a part of internaldata. To get the data later from the jqGrid you can use jQuery("grid_id").getGridParam('userData').

Best regards
Oleg

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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