Forum
When I define the call-back for the beforeSearch event it does not fire when I define it as part of ym grid setup. It only fires when I define it via the filterGrid function, is that intentional or a bug?
My HTML:
<div id="ListPager" class="scroll" style="text-align:center;"></div>
My jqGrid definition:
$('#list').jqGrid({
...
gridModel: true,
gridNames: false,
gridToolbar: true,
autosearch: false,
enableClear: true,
enableSearch: true,
toolbar: [true, "top"],
beforeSearch: function() {
//some code - this does not get triggered!
}
...
My filtergrid definition:
gridModel: true
});
Also, if during filterGrid I do not specify gridModel it throws an alert "filer is not set". Keep in mind if I did not specify the following properties during the grid setup it also does not work:
$('#list').jqGrid({
...
gridModel: true,
gridNames: false,
gridToolbar: true,
autosearch: false,
enableClear: true,
enableSearch: true,
toolbar: [true, "top"],
...
Why is it required to define the above properties as well as using the filterGrid, should specifying the event cll-backs like beforeSearch not work if I specify them like this?
$('#list').jqGrid({
...
gridModel: true,
gridNames: false,
gridToolbar: true,
autosearch: false,
enableClear: true,
enableSearch: true,
toolbar: [true, "top"],
beforeSearch: function(){
//some code
}
10:24
Moderators
30/10/2007
Hello,
http://www.secondpersonplural......0z66wb.htm
The most common mistake
Also you should set these parameters not to the grid, but to the filterGrid
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.
I just looked at the documentation and it seems it is a feature then , just the way ti works.
Another question, in stead of manually specifying the
<div id="mysearch"></div>
I just specified toolbar:[true, "top"],as part of my grid setup, which automatically creates the search div for me, is this
wrong or OK to do (it works fine by the way); i.e. a good practice?
I then, when referencing the div simply do this:$(item.replace('#', '#t_')).filterGrid....(item = #grid_id)
01:39
Moderators
30/10/2007
Hello,
Yes I think that this is correct.
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.
13:48
17/09/2009
I cannot get beforeSearch to fire!
gridModel: true,
gridNames: true,
formtype: "vertical",
enableSearch: true,
enableClear: true,
autosearch: false,
afterSearch: this._SetProgressUIVisibility(false),
beforeSearch: this._SetProgressUIVisibility(true)
});
The afterSearch works fine! Anyone know why this is or what I've done wrong?!
HELP!
Just because I'm paranoid, doesn't mean they're not out to get me.
13:22
Moderators
30/10/2007
Hello,
What do the this._SetProgressUIVisibility(true) function?
Simple check is:
beforeSearch : function() {
alert("I'm lunched");
}
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.
Most Users Ever Online: 715
Currently Online:
90 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