jQuery UI Widgets › Forums › Grid › sorting problem with virtual grid
This topic contains 9 replies, has 3 voices, and was last updated by Hristo 3 years, 1 month ago.
September 28, 2018 at 11:55 am sorting problem with virtual grid #102180
I have a problem with sorting in a grid using virtualmode in combination with a dataadapter using the loadServerData callback, here is a simplified example:
when scrolling through the grid, the sort function is constantly called. I could work around that to prevent unnecessary update calls, but even that doesn’t prevent that sometimes the grid trips over itself:
Uncaught Error: jqxGrid: The data is still loading. When the data binding is completed, the Grid raises the ‘bindingcomplete’ event. Call this function in the ‘bindingcomplete’ event handler.
The core problem seems to be that the grid tries to keep updating the sorting, even though that’s already handled on the server side. How can I prevent this?
RomanOctober 1, 2018 at 12:32 pm sorting problem with virtual grid #102209
Could you clarify your issue?
I am not sure I understand you very well your case.
This error can be thrown when server-side processing is enabled and you are trying to initiate one operation (sorting/filtering) before another (sorting/filtering) has been completed.
You could try to bind to “bindingcomplete” event with it you will understand when one operation is finished.
Please, take a look at this demo, too:
http://www.jqwidgets.comOctober 1, 2018 at 5:29 pm sorting problem with virtual grid #102214
The problem is the sort is not initiated by my code, this is the call trace for the source.sort() function:
sort @ (index):37
sortby @ jqx-all.js:109
dataview.update @ jqx-all.js:93
q @ jqx-all.js:93
l @ jqx-all.js:93
callDownloadComplete @ jqx-all.js:19
K @ jqx-all.js:19
(anonymous) @ (index):54
I’m simply calling the callback here I got from loadServerData(). The error case is identical, except that it doesn’t make it into my source.sort() function.
My question is: why is that callback attempting to sort anything? It just got the sorted data back from the server.
RomanOctober 2, 2018 at 11:54 am sorting problem with virtual grid #102233
It is not necessary to use the “loadServerData” callback.
If you bind the data in the right way and using server sorting it should happen on the server side as in this example.
loadServerDatacallback function which allows you to manually handle the ajax calls through the jqxDataAdapter.
http://www.jqwidgets.comOctober 2, 2018 at 12:32 pm sorting problem with virtual grid #102235
I’m updating the grid via a websocket, so using loadServerData is the only option I know of.
Another key aspect is the use of virtual mode, so with huge tables only the visible part is loaded as needed. Your example loads all the data at once, so it’s not applicable to my problem.
When scrolling through a virtual and sorted grid and when it tries to load additional data, only then the problem is triggered. For some reason the grid tries again to sort the received data and sometimes produces that exception.
RomanOctober 3, 2018 at 12:39 pm sorting problem with virtual grid #102259
There is another callback that is possible to use downloadComplete
With virtual mode the data is loaded on demand.
Please, take a look at these demos:
– PHP: “Grid Server Paging”
– Java: “Grid Server Sorting, Paging and Filtering”
http://www.jqwidgets.comOctober 3, 2018 at 2:07 pm sorting problem with virtual grid #102265
Why can’t I use loadServerData? It’s a documented API, which in this situation doesn’t seem to work properly.
Can you please look at the example I posted initially?
You only need to open the console, scroll through the list and you’ll see at least the sort prints, which shouldn’t happen and sometimes it throws an exception.
Unless I’m doing something wrong, this looks to be a bug in jqxGrid.
RomanOctober 10, 2018 at 11:35 am sorting problem with virtual grid #102335
I would like to suggest you look at this forum topic.
There you could find out the specifics of the implementation of the
It is created for the real server case.
http://www.jqwidgets.comApril 14, 2020 at 7:21 pm sorting problem with virtual grid #111729
Still the same exception in 2020 🙁
at c.<computed>.sortby (jqx-all.js:99)
at b.jqx.dataview.dataview.update (jqx-all.js:83)April 15, 2020 at 8:46 am sorting problem with virtual grid #111738
Could you clarify your issue?
Please, provide a source code that demonstrates this.
Meanwhile, I would like to suggest you try to use all the needed “*.js” files instead of the “jqx-all.js” file.
This will be one fast test to recognize what causes the issue.
You must be logged in to reply to this topic.