Forum


01:21

Hi,
i need set some parameters after grid is complete (sorting, page ...) - i use event gridComplete
My code is
gridComplete: function () {
jQuery("#sluzby").setGridParam({sortname:"nazev_sluzby",sortorder:"asc"}).trigger("reloadGrid");
}
But grid doesn't reload -> i must click reload button
Thanks,
Martin
11:58

Moderators
30/10/2007

Hello,
This way we go in unterminated loop. 🙂
My simple question is : please explain me what you try to realize? - not what should be called, but describe with simple words your problem.
Reagrds
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.
02:12

Hello
I use jqgrid in our CMS. When i want edit some document i need to load new page.
And i want the grid would remember settings (sorting, page, selected row, search filter...)
I save grid parameters to session and when i back to the page with grid i need set again these parameters.
Thanks
Martin
02:57

24/02/2009

Hello,
with loadComplete it works fine because we change the datatype to 'local' before sorting the data grid, so the event loadComplete it's only fired once.
Martin, you can put it back the sortname and sortorder in the jqGrid declaration.
Or, more easy, do the sorting after the jqGrid declaration. You don't have to put the code in a gridComplete or loadComplete callback function:
$(document).ready(function(){
jQuery(”#sluzby”).jQuery({
…
});
// JSP ?
// If we have session parameters we set them and reload the grid
<% if (session.parameters….) { %>
jQuery(”#sluzby”).setGridParam({sortname:”nazev_sluzby”,sortorder:”asc”}).trigger(”reloadGrid”);
<% } %>
});
Regards.
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