-
23 Aug 2011 9:27 PM #1
GridPanel with auto height
GridPanel with auto height
now I have a requirement that we need display table data in the page.
i am trying to use grid to achieve that goal.
the question is the grid need a fix height when rendering.
what i need is a auto height for display the dynamic data in the grid store.
the padding button in the grid is not needed in this page.
do i have to calculate the height and set the height after adding the data in the grid store?
-
23 Aug 2011 9:35 PM #2Sencha - Community Support Team
- Join Date
- Nov 2007
- Location
- Helsingborg, Sweden
- Posts
- 2,454
- Vote Rating
- 48
Try setting autoHeight : true
On your grid config
-
23 Aug 2011 11:37 PM #3
-
23 Aug 2011 11:57 PM #4
but another problem comes...
i have a lot of columns in the grid ... the extra columns were hidden by the grid ...
i found this in the source code.
/**
* @cfg {Boolean} autoHeight
* true to use height:'auto', false to use fixed height (defaults to false).
* Note: Setting autoHeight: true means that the browser will manage the panel's height
* based on its contents, and that Ext will not manage it at all. If the panel is within a layout that
* manages dimensions (fit, border, etc.) then setting autoHeight: true
* can cause issues with scrolling and will not generally work as expected since the panel will take
* on the height of its contents rather than the height required by the Ext layout.
*/


Reply With Quote