Dojo Datagrid: virtual scrolling
I am using a ReadQueryStore to fetch data from the server that has to be
displayed in a Dojo Datagrid. When I use my mouse to drag the scrollbar, I
was expecting that a single request would be sent to the server after I
release mouse button. Instead I observed that a lot of requests were sent
to the server. I think, each time the scroll position exceeds
'rowsPerPage' size a request is being sent to server. Is this expected ?
I further noticed that DataGrid isn't rendering correctly as a consequence
of these multiple requests. I was expecting that the DataGrid would render
based on the data in the latest response. However sometimes it gets struck
processing the data from the first request. Here is an example of the
status of various able at such a time
scoller firstVisibleRow : 922 scoller lastVisibleRow : 942 first request
fetches : rows 900-925 second request fetches : rows 925-950
When the scroller is in such a position only rows 920-925 are getting
displayed. Even though the second request has relevant data the grid
doesn't render.
Has anyone noticed this behavior before ? Can anyone tell me what could be
wrong and any workarounds? I am on dojo 1.6
No comments:
Post a Comment