Forum


I want my grid to load data depending on the different search criteria selected by the user. So I modified the grid url dynamically. The " loadonce: false" is set during the grid declaration. But, my observations are as follows
1. When I set loadonce: false, I can see the data after the url is changed dynamically. But client side sort is not working
2. When I set loadonce: true, the client side sort is working, but the data is not refreshed after the dynamic change of url.
3. I tried to toggle the loadonce dynamically, but the client side sorting is not working. I have the latest grid code.
Here is my code
jQuery("#list19").jqGrid('setGridParam',{url:surl});
$("#list19").trigger("reloadGrid");
Help is appreicated.
00:57

10/08/2009

Hello Aarati,
if you don't want or don't can implement data sorting on the server you can use loadonce:true. In the case after the data will be loaded the jqGrid change the origival datatype paremeter of jqGrid to 'local'. After that all operations: sorting, paging and filtering/sorting work local. If you need refresh the data you can set datatype paremeter of jqGrid to its original value ('json' or 'xml') and then trigger "reloadGrid". See almost the same answer here.
Best regards
Oleg
10:33

05/01/2011

OlegK said:
Hello Aarati,
if you don't want or don't can implement data sorting on the server you can use loadonce:true. In the case after the data will be loaded the jqGrid change the origival datatype paremeter of jqGrid to 'local'. After that all operations: sorting, paging and filtering/sorting work local. If you need refresh the data you can set datatype paremeter of jqGrid to its original value ('json' or 'xml') and then trigger "reloadGrid". See almost the same answer here.
Best regards
Oleg
Thank you Oleg. The reply was very very useful. Got the client side sorting to work.
I am now setting loadonce:true and reloading the grid with datatype:json. I did not want to provide server side sorting, since I wanted to make use of the sorting feature provided by the grid.
Regards,
Aarati
Most Users Ever Online: 715
Currently Online:
73 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