-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loading problem with JsonRest store with paging (height is set to 'auto') #54
Comments
I put together a more comprehensive test case for JsonRest to demonstrate how the paging, saving, and deleting works: |
I had to do some changes to the application layout, so I gave dGrid another try, turns out that it's working properly, but the grid is not loading other pages if the height is set to 'auto'. I didn't have time to investigate more. |
The height of the rows or the height of the grid is set to auto? |
height of the grid. If I remember correctly, the grid was in a dijit content pane, with a div on top of it to hold a few buttons, (so height of 100% didn't work). |
I am still not sure I understand how to reproduce this. By itself setting height: auto; on the grid will normally result in a zero height (since the overflow setting doesn't require that the grid take up any space). If you are using height: auto; in combination with making the scroller non-scrolling (overflow: visible) than scrolling doesn't take place there is no scrolling to be done, all the rows should be shown. If you want the grid to take up all the space of a parent except for a certain amount of space, you should probably use an absolutely positioned grid with top and bottom properties set to position it. with the right amount of margins. |
I'm trying to use a OnDemandGrid with a JsonRest store, it works for the first page of data, but when I scroll down to see other results, I see that another call is made to the server with a different range, but the grid is not updating correctly. Server side I return the Range-Content as described in the documentation.
JS code:
The json return on the first call to /mock/productgroups/
[{"id":70926,"name":"Fake Product"},{"id":580689,"name":"Fake Product"},{"id":801159,"name":"Fake Product"},{"id":335780,"name":"Fake Product"},{"id":985208,"name":"Fake Product"}]
and the headers for that call:
Status Code:200 OK
Request Headers:
Accept:application/javascript, application/json
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Content-Type:application/x-www-form-urlencoded
Range:items=0-4
X-Requested-With:XMLHttpRequest
Response Headers:
Connection:Keep-Alive
Content-Length:180
Content-Type:text/x-json;charset=UTF-8
Keep-Alive:timeout=15, max=70
cache-control:no-cache
content-range:0-4/500
And when I scroll the grid to see other results, here's the result:
[{"id":174082,"name":"Fake Product"},{"id":397380,"name":"Fake Product"},{"id":403586,"name":"Fake Product"},{"id":921312,"name":"Fake Product"},{"id":379202,"name":"Fake Product"}]
and corresponding headers:
Request Method:GET
Status Code:200 OK
Request Headers:
Accept:application/javascript, application/json
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Content-Type:application/x-www-form-urlencoded
Range:items=5-9
X-Requested-With:XMLHttpRequest
Response Headers:
Connection:Keep-Alive
Content-Length:181
Content-Type:text/x-json;charset=UTF-8
Keep-Alive:timeout=15, max=62
cache-control:no-cache
content-range:5-9/500
The text was updated successfully, but these errors were encountered: