-
5 Jun 2012 2:33 PM #1
Unanswered: infinite scroll grid height
Unanswered: infinite scroll grid height
Is there a way to have the height of an infinite scroll grid shrink to fit the number of rows when the store returns fewer records than would be required to fill the configured height?
-
7 Jun 2012 9:05 AM #2Sencha - Support Team
- Join Date
- Jul 2010
- Location
- Houston, Tx
- Posts
- 7,185
- Vote Rating
- 194
- Answers
- 433
Not that I am aware of. I have used the following in previous apps, perhaps it may help:
Regards,Code:// call on grid.afterlayout / resize calculatePageSize: function() { if (!this.rendered) { return false; } var row = this.view.getRow(0); var rowHeight; if (!row) { rowHeight = 41; } else { rowHeight = Ext.get(row).getHeight(); } var height = this.getView().scroller.getHeight(); var ps = Math.floor(height / rowHeight); return (ps > 1 ? ps : false); },
Scott.
-
15 Jun 2012 3:03 AM #3
I have the same problem. And searching for a solution.
@Scott, it seems that your code is Ext 3.x, the functions you are using are not available anymore. If someone has a tip on how to access a row EL from the view I guess one could reuse your code, but I couldn't see a way to do it. Dom-Query perhaps?


Reply With Quote