Forum
14:19
28/01/2013
Hi,
I have a grid with some data in it. Based on certain values selected by User in other form, I have to call the multi Search of jqGrid. I have the column name/value pairs on which the search should be performed, but couldn't find a way to call the search on the grid with these arguments, similar to the way we do multi search from the Search toolbar.
Anyone has any suggestions?
Thanks!
Regards,
Pankaj
15:30
28/01/2013
Got below code from google. Can someone suggest how to use this with local data. I am loading the grid with loadonce=true and don't want to send the request back to the server.
$("#search").click(function() { var searchFiler = $("#filter").val(), grid = $("#list"), f; if (searchFiler.length === 0) { grid[0].p.search = false; $.extend(grid[0].p.postData,{filters:""}); } f = {groupOp:"OR",rules:[]}; f.rules.push({field:"name",op:"cn",data:searchFiler}); f.rules.push({field:"note",op:"cn",data:searchFiler}); grid[0].p.search = true; $.extend(grid[0].p.postData,{filters:JSON.stringify(f)}); grid.trigger("reloadGrid",[{page:1,current:true}]); });
15:34
10/08/2009
Hello!
I posted many variation on the stackoverflow.com what can be done to do what you need. Look at the answer or this one for example.
Best regards
Oleg
10:28
10/08/2009
here is described format of postData.
With
you mean probably something like id=123 OR id=345.
You should just use groupOp: "OR" like I described in previously referenced answers.
12:28
17/05/2013
Hmm…Is that link you gave working? It shows this same topic or do I miss something. But what I´m trying to achieve is, that for example I have 2 grid columns and I want to filter them like this based on user selections:
(id=1 OR id = 2) AND col2 = 456
So for example the code could be if possible:
f = {groupOp:"AND",rules:[]};
f.rules.push({field:"id",op:"eq",data:[1,2]});
f.rules.push({field:"col2",op:"eq",data:456});
12:53
10/08/2009
Sorry, the correct link to the docomentation is here. If you need implement (id=1 OR id = 2) AND col2 = 456 then you should create subgroup with groupOp:"OR" and use groupOp:"AND" on the top level. See the answer for the code example.
Most Users Ever Online: 715
Currently Online:
22 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