Forum
12:16
10/08/2009
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
Moderators
30/10/2007
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.
12:28
Moderators
30/10/2007
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.
12:45
10/08/2009
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.
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66