Forum

November 2nd, 2014
A A A

Please consider registering
guest

Log In Register

Register | Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

    

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

Topic RSS
local sorting (at least optional) of the data loaded with loadonce:true
28/02/2013
12:16
OlegK
Germany
Member
Forum Posts: 1245
Member Since:
10/08/2009
Offline

Hello Tony,

I think that the option loadonce:true will be used frequently if one have to access to some existing interface of the server. In case of usage JSONP one can access even to absolutely foreign data source. In the case it would be natural to include support of local sorting of the loaded data. Currently one have to load first the data and trigger reloadGrid once which follows to flicker. The results looks not so professional.

Local sorting of the data loaded from the server with loadonce:true seems to me the best default behavior. One can additionally include option which will prevent the step so that the behavior of jqGrid will be like in the previous versions.

Best regards
Oleg 

01/03/2013
09:57
tony
Sofia, Bulgaria
Moderator
Forum Posts: 7720
Member Since:
30/10/2007
Offline

Hello Oleg,

If I understand right you want to have loadonce: true as default!?

Not sure that this is a good idea (If I understand right)

Regards

Tony

For professional UI suites for PHP, ASP.NET and ASP.NET MVC visit us at our commercial products site - trirand.net - by the very same guys that created jqGrid.
01/03/2013
10:47
OlegK
Germany
Member
Forum Posts: 1245
Member Since:
10/08/2009
Offline

Hello Tony,

what I mean is just that jqGrid sort the data locally if the option loadonce:true are used. In many scenarios one can't sort the data on the server. Only the local soring is the new requirement in case usage loadonce:true.

Regards
Oleg 

01/03/2013
12:28
tony
Sofia, Bulgaria
Moderator
Forum Posts: 7720
Member Since:
30/10/2007
Offline

Oleg,

If loadonce is true we directly set datatype local after the request and put the data in the local data array - i.e the sort after this is local. See here

Or you mean sort the data initially before to put it in the grid

For professional UI suites for PHP, ASP.NET and ASP.NET MVC visit us at our commercial products site - trirand.net - by the very same guys that created jqGrid.
01/03/2013
12:45
OlegK
Germany
Member
Forum Posts: 1245
Member Since:
10/08/2009
Offline

Tony,

if the data have already datatype: "local" then addLocalData will be called before addJSONData. addLocalData sorts the local data. On the other side if one loads the data from the server and one have loadonce: true option then the first page of data will be displayed in exact the same order in which the data returned from the server becasue addJSONData will be called directly. One just places the rest of the server response in the internal data parameter (see last part of the code of addJSONData here). So there are exist the requirement to the server to return sorted data from the server in case of loadonce: true. In some scenarios it's impossible to change existing code on the server. So my suggestion will be to allow to load unsorted data from the serve and to perform local sorting before the data will be displayed.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 215

Currently Online:
32 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1245

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11348

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10555

Posts: 31226

Newest Members: benhamc, vi6cmevm, htec1, atalabaseen, rboatright, voyager

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

Administrators: admin: 61

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information