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 sorting
26/07/2010
01:16
Avatar
cdrx
New Member
Members
Forum Posts: 1
Member Since:
26/07/2010
sp_UserOfflineSmall Offline

Hello,

I'm quite new to jqGrid, and I'm trying to use the "local sorting and server side paging" feature as described in the wiki (http://www.trirand.com/jqgridw.....ide_paging).

However the example code does not seem to work properly with the latest 3.7.2 version.

In my case, the paging is ok but the sorting produces no results at all.

I'm using JSON data, and the callbacks loadComplete and onPaging are called in time. But I think that setting data to "local type" does not seem to work.Or at least the sort does not seem to take it into account.

When using default settings ( remote data), the http server recieves the requests and sorting parameters when sorting is triggered.

I don't know if this is a known bug for this version or am I the first to run into this issue.

Also, I'm quite new to jqGrid, I don"t know where to start in order to trace/investigate the issue in the code.

So any info or pointers would realy help ,

Regards,

Cdrx

27/07/2010
00:50
Avatar
swlego
Member
Members
Forum Posts: 3
Member Since:
27/07/2010
sp_UserOfflineSmall Offline

I'm having the exact same problem. I'd love to hear a solution.

27/07/2010
18:18
Avatar
swlego
Member
Members
Forum Posts: 3
Member Since:
27/07/2010
sp_UserOfflineSmall Offline

FYI, I was able to get this working by setting {loadonce: true} when I initialize the grid. Seems like that should just duplicate the functionality of the loadComplete: function(){} mentioned in this tutorial: /jqgridwiki/doku.php?id=wiki:howto_grid_base#client_side_sorting_but_server_side_paging

But for some reason adding the loadonce:true did the trick for me. Go persistence!

Fantastic toolset by the way. Awesome work!

just for clarity

jQuery("#gridID").jqGrid({

     loadonce:true,

     onPaging: function(which_button){

          $j("#gridID").setGridParam({datatype:'json'}).trigger("reloadGrid");

     },

     loadComplete: function(){

          $j("#gridID").setGridParam({datatype:'local'}).trigger("reloadGrid");

     }

});

That seems to do the trick. I think loadonce and loadComplete are redundant in their functionality so maybe there's a bug in there or I'm just unclear on when loadonce is supposed to be implemented.

27/07/2010
19:31
Avatar
swlego
Member
Members
Forum Posts: 3
Member Since:
27/07/2010
sp_UserOfflineSmall Offline

UPDATE, this doesn't work as expected. The pager is not updated with values for "total", "page", and "records" passed in the JSON string when using loadOnce, but it is when loadOnce is disabled, but then of course sorting doesn't work. I think there's a bug in here somewhere.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
69 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