Forum
16:40
27/10/2011
hi, Iam having trouble with some custom search dialogs
my Pager is setup like this and works fine;
jQuery("#list5").jqGrid('navGrid', '#pager5',{view:false,edit:false,add:false,del:false,edit:false},{},{},{},{
closeOnEscape: true,
closeAfterSearch: true,
multipleSearch:true,
multipleGroup:true,
showQuery: true,
caption:"Search..."},{} );
We want our users to be able to store their search requests.
Therefore I want them to select the search options from the dialog -as always, but then store the postData somewhere on the server.
later on I need the postData (the search request) to be editable (preferably via the standard- search dialog )
So I made a click button like this:
$("#search_grid").click(function(){
jQuery("#list5").jqGrid('searchGrid',{
closeOnEscape: true,
closeAfterSearch: true,
multipleSearch:true,
multipleGroup:true,
showQuery: true,
caption:"AN OTHER CAPTION"
});
});
Problem with that is: The "search" that is triggerd first sets the caption and the options , and the following actions do not set the new Caption/options. -> i cannot get around this atm.
Maybe I got something wrong here, and someone can point me towards a solution?!
If you have any ideas, how i can make the stored "postData/searchoptions" load into the dialog again -at a later time. Please give me a hint 😉
Thanks a lot !
tempel
18:56
10/08/2009
Hello Tempel,
the options recreateFilter: true of the searchGrid seems to me what you need to use.
By the way some time before I posted here the suggestion to change the default settings of recreateForm and recreateFilter from currently default value false to true. I still have the same opinion. At the beginning of my usage of jqGrid I spent at least two days in debugging some strange problems which origin was recreateForm setting. I read regelmassig problems like yours. I still hope that Tony will do the changes. Till the time I can recommend you to change jqGrid defaults by changing of $.jgrid.search. My personal default settings are
multipleSearch: true,
multipleGroup: true,
recreateFilter: true,
closeOnEscape: true,
closeAfterSearch: true,
overlay: 0
});
You can set the settings which are the best to your project in one JavaScript file which you will includes on all your HTML pages directly after the jquery.jqGrid.min.js.
Best regards
Oleg
14:29
27/10/2011
hi,
looking into the plugin source grid.formedit.js I found this:
var fl = $("#"+fid),
filters = fl.jqFilter('filterData');
When I use console.log(JSON.stringify(filters)) I can see the filterStr like this:
{"groupOp":"AND","rules":[{"field":"RemoteAddress","op":"eq","data":""},{"field":"RemoteAddress","op":"eq","data":""}]}
this is what I need to get from my custom search box
Now I am trying to do the exact same thing for my "custom search box": (prevented the default functions from beeing executed)
and just do; filters = $("#test").jqFilter('filterData');
But this gives me the full postData obj plus the SearchFilter.
I think i need to do something like a clear/reset before using jqFilter("filterData")
any hints?
What I want do do is: modify this string, store it, then build my postData obj. and finally refresh my grid with this.
Most Users Ever Online: 715
Currently Online:
46 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