Forum
00:24
Moderators
30/10/2007
Hello,
To use trigger("reloadGrid") you should
jQuery("#mygrid").trigger("reloadGrid") in order to known which grid to trigger.
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.
07:07
19/05/2009
thanks for the reply, yes i do know i have to do jQuery(”#mygrid”).trigger(”reloadGrid”). my question was whether
jQuery(”#mygrid”).trigger(”reloadGrid”) and hitting the 'REFRESH' button on the pager do the same thing?
REFRESH button refreshes the GRID to page 1 ( incase if you are on say page 3 of 5)
jQuery(”#mygrid”).trigger(”reloadGrid”) just refreshes the current page and the same page is reloaded ( so if you are on page 3 of 5 you stay on page 3 )
08:57
Moderators
30/10/2007
Hello,
I hope you answered to your problem.
To refresh a grid at first page
$("#mygrid").setGridParam({page:1}).trigger("reloadGrid") or to a page what you want.
to preserve the current page when you push refresh button in navigator
$("#mygrid").navGrid("#pager",{refreshstate:'current'},.....);
Hope this helps
Best 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.
19:54
25/02/2010
Here is a link to working example that demonstrates this problem:
On the page there are 2 buttons. First loads grid with 500 records, second with only 40. Please use following steps to recreate:
1. Click first "Reload Grid" (top left) button and see grid loads.
2. Scroll grid to Page #20, so it shows records 201 - 240.
3. Click second "Reload Grid With Less Data" button and see grid reloads, but page index is carried over from previouse request.
If you view source of aspx page you will see that onclick I will explicitly set {page: 1} ($('#scrolling').setGridParam({page:1, filter: 1}).trigger('reloadGrid');").
19:59
Moderators
30/10/2007
Hello,
Little confused, sorry.
In case when you use scroll : 1
please use the following code to reload the grid with certain page
$("#mygrid").trigger("reloadGrid",[{page:1}]);
Best 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.
21:42
Moderators
30/10/2007
Hello,
This is only for the page - if you want to use other params do it so:
$("#mygrid").setGridParam(...).trigger("reloadGrid",[{page:1}]);
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.
12:14
Moderators
30/10/2007
Hello,
How do you set your other parameters?
if you want to add a parameter to the request you should
$("#mygrid").jqGrid('setGridParam',{postData:{...here your new params}});
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.
17:40
23/06/2011
Hi, Tony,
I'm using 3.8.2,
I'm trying to use below code to reload data from server side and show specific page, like current page. $("#mygrid").setGridParam({datatype:json}).trigger("reloadGrid",[{page:5}]);
grid could load data from server properly, but always show first page instead of page 5.
I think haypet should have the same case to me, could you clarify it for me?
Regards
Simon
Most Users Ever Online: 715
Currently Online:
53 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