Opened 9 years ago
Closed 8 years ago
#17581 closed defect (patchwelcome)
DataGrid not loading all pages using QueryReadStore
Reported by: | godhoomrohit | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | tbd |
Component: | DojoX Grid | Version: | 1.6.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
I am using QueryReadStore? for fetching the data with pagination. If store of grid is null, i am creating new QueryReadStore? else changing the url.
The code is: if(grid.store == null){
var storeLocal = new dojox.data.QueryReadStore?({ url: myUrl }); grid.setStore(storeLocal);
} else {
grid.store.url = myNewUrl; grid._refresh();
}
Now the scenario: 1.Populate grid with more than 50 data with page size 20 as default. (1 request sent to fetch 20 items) 2.click 50 page size and 50 records are fetched.(25 items 2 times) 3.change url of store and fetch data with less than 50 items(suppose 32 items are there). 4.again click 50, first 25 records are from new url, next 5 (32-25) are from old data. Grid is sending only 1 request.
I see that old data are stored in grid._by_idx and grid is taking data from it.
Related ticket: https://bugs.dojotoolkit.org/ticket/11023
DojoX Grid and EnhancedGrid? are deprecated in favor of dgrid and gridx.
You should upgrade your code to use one of those two grids.
We will consider patches to the old DojoX Grid code though.