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
local sorting (at least optional) of the data loaded with loadonce:true
28/02/2013
12:16
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall 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
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall 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 Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

01/03/2013
10:47
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall 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
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall 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 Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

01/03/2013
12:45
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall 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: 715

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