Skip to content
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

OnDemandGrid does not load additional rows when grid height gets bigger and therefore more rows could be displayed #361

Closed
frabe opened this issue Dec 4, 2012 · 4 comments

Comments

@frabe
Copy link

frabe commented Dec 4, 2012

Open test

dgrid/test/OnDemand_promises.html

Make height of grid bigger by executing

require(["dojo/dom-style"], function(domStyle){ 
  domStyle.set("grid", "height", "1000px");
});

Grid still displayes only 25 rows even if there is space for more.

@ttrenka
Copy link
Contributor

ttrenka commented Dec 18, 2012

Set minRowsPerPage and/or maxRowsPerPage before adjusting the height of the dgrid.

@frabe
Copy link
Author

frabe commented Dec 19, 2012

Thanks for your answer Tom!

like this:

require(["dojo/dom-style"], function(domStyle){ 
  myGridInstance.set("minRowsPerPage", 30);
  domStyle.set("grid", "height", "1000px");
});

I see no difference

@ttrenka
Copy link
Contributor

ttrenka commented Dec 19, 2012

I'm not sure if .set will work, since I am using an older pre-beta version of dgrid. But I'd suggest cranking that number up and seeing if that helps at all. I know I'm able to do this directly with the older version of dgrid (and in fact wrote a custom extension to expand or contract the height of a dgrid on the fly)...

@ghost ghost closed this as completed in 4a73385 Dec 21, 2012
@ghost
Copy link

ghost commented Dec 21, 2012

Whoops. Didn't mean for that to close this, I guess github saw "resolves blah" and didn't care about the "partially".

This is a legit issue; however, keep in mind that any time you directly change the dimensions of the grid, you're going to have to call resize on it to get it to react; otherwise it has no way of knowing.

This fixes the issue in most cases, by calling _processScroll from resize. However, there's still a problematic edge case (literally actually, I see it happen when the grid is scrolled all the way up), where for some reason _processScroll isn't even checking the lower preload node, so it's not properly requesting more data. I'll have to look into that at a later point in time.

@ghost ghost reopened this Dec 21, 2012
edhager added a commit to edhager/dgrid that referenced this issue Jul 22, 2013
…ing to stop.

In cases where the first/top preload node was visible but empty, the second/bottom one was not being processed.  The top one had to be scrolled beyond the buffer limit before the second one was processed.
edhager added a commit to edhager/dgrid that referenced this issue Jul 23, 2013
…ing to stop.

In cases where the first/top preload node was visible but empty, the second/bottom one was not being processed.  The top one had to be scrolled beyond the buffer limit before the second one was processed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants