-
30 Apr 2012 1:59 AM #1
Unanswered: Scrolling in Gridpanel
Unanswered: Scrolling in Gridpanel
Hi,
I have defined a gridpanel with two columns. The gridpanel is embedded into a container. The size of the container allows to view 6 rows. Since the actual list is longer (ca.200 rows) I thought that the gridpanel would automatically show scroll bars when i set autoScroll to true. The code below is generated by SenchaArchitect. Also I wasn't exactly clear what the difference between the 2 autoScrolls (on the gridpanel and on the viewConfig) is. I tried all combinations but no scroll bars.
Any hint appreciated.Code:xtype: 'container', flex: 1, items: [ { xtype: 'gridpanel', id: 'toprankings', autoScroll: true, title: 'Top Rankings', store: 'TopCombined', columns: [ { xtype: 'gridcolumn', dataIndex: 'userid', flex: 2, text: 'User' }, { xtype: 'numbercolumn', align: 'right', dataIndex: 'score', flex: 1, text: 'Score', format: '0,000' } ], viewConfig: { autoScroll: true } }
-
30 Apr 2012 6:53 AM #2Sencha - Support Team
- Join Date
- Jul 2010
- Location
- Houston, Tx
- Posts
- 7,185
- Vote Rating
- 194
- Answers
- 433
I would remove the grid from the container. No need to place a gridPanel (panel) inside another container.
The grid also handles the scrolling itself, no need for autoScroll.
Regards,
Scott.
-
30 Apr 2012 11:52 AM #3
Hi Scott,
thanks for the hints. The good thing: it works! Is there any chance to get some hints why the container 'parent' prohibited the scrolling? I would just like to get a better understanding of the framework.I also disabled the 'autoScroll' and still get the scrolling. So what is the idea of the 'autoScroll' otion?
Thanks
Olaf


Reply With Quote