Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Client side sort with dynamic url
10/02/2010
18:41
Avatar
sd
NA
New Member
Members
Forum Posts: 1
Member Since:
10/02/2010
sp_UserOfflineSmall Offline

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.

24/03/2011
05:19
Avatar
aarati
Member
Members
Forum Posts: 8
Member Since:
05/01/2011
sp_UserOfflineSmall Offline

Hi,

Were you able to find a solution to this problem?Am facing a similar issue.

Regards,

Aarati

26/03/2011
00:57
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

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 

30/03/2011
10:33
Avatar
aarati
Member
Members
Forum Posts: 8
Member Since:
05/01/2011
sp_UserOfflineSmall Offline

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.Smile

 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

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
31 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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information