Forum

July 10th, 2011
You must be logged in to post Login Register

Search Forums:


 






local sorting (at least optional) of the data loaded with loadonce:true

UserPost

12:16
28/02/2013


OlegK

Germany

Member

posts 1210

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 

09:57
01/03/2013


tony

Sofia, Bulgaria

Moderator

posts 7375

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.

10:47
01/03/2013


OlegK

Germany

Member

posts 1210

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 

12:28
01/03/2013


tony

Sofia, Bulgaria

Moderator

posts 7375

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.

12:45
01/03/2013


OlegK

Germany

Member

posts 1210

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.


About the jQuery Grid Plugin – jqGrid forum

Most Users Ever Online:

215


Currently Online:

xtempore

44 Guests

Forum Stats:

Groups: 1

Forums: 7

Topics: 10271

Posts: 30349

Membership:

There are 11036 Members

There have been 448 Guests

There is 1 Admin

There are 2 Moderators

Top Posters:

OlegK – 1210

markw65 – 179

kobruleht – 144

phicarre – 132

YamilBracho – 124

Renso – 118

Administrators: admin (60 Posts)

Moderators: tony (7375 Posts), Rumen[Trirand] (81 Posts)




Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information