Forum



00:06

24/08/2010

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?
11:32

10/08/2009

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
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66