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.
If I understand right you want to have loadonce: true as default!?
Not sure that this is a good idea (If I understand right)
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
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: 215
Currently Online: tony
Currently Browsing this Page:
Guest Posters: 447
Newest Members: DGS, sunilkatta99, Surendra Rayapati, rize, Jamil1234, poff
Moderators: tony (7516), Rumen[Trirand] (81)
Administrators: admin (61)