PDA

View Full Version : [1.0] gridpanel autoheight



SouthDeveloper
Feb 12, 2010, 8:44 AM
Hello,

In 0.8.2 i had a grid that had the initial value of height="0", as i was adding data to it, i would set autoHeight = "true" and then call syncSize();

In 1.0 it doesnt work anymore.



#{GridPanel1}.autoHeight = true; #{GridPanel1}.syncSize();


Thanks

Vladimir
Feb 12, 2010, 9:19 AM
Hi,

Please read the following note from ExtJS documentation


A grid requires a width in which to scroll its columns, and a height in which to scroll its rows. These dimensions can either be set explicitly through the <tt>height (http://www.extjs.com/deploy/dev/docs/output/Ext.BoxComponent.html#Ext.BoxComponent-height)</tt> and <tt>width (http://www.extjs.com/deploy/dev/docs/output/Ext.BoxComponent.html#Ext.BoxComponent-width)</tt> configuration options or implicitly set by using the grid as a child item of a Container (http://www.extjs.com/deploy/dev/docs/output/Ext.Container.html) which will have a layout manager (http://www.extjs.com/deploy/dev/docs/output/Ext.Container.html#Ext.Container-layout) provide the sizing of its child items (for example the Container of the Grid may specify <tt>layout (http://www.extjs.com/deploy/dev/docs/output/Ext.Container.html#Ext.Container-layout):'fit'</tt>).

SouthDeveloper
Feb 12, 2010, 11:09 AM
From what i understand, what i said is right



<ext:GridPanel AutoExpandColumn="ColumnNome" Height="0" Border="false" HideHeaders="true"
ID="GridPanel1" Cls="cell-border" runat="server" StoreID="StoreCnae" Width="450">


I want to set this grid autoHeight property later, when I hide a window



<Buttons>
<ext:Button runat="server" Text="Ok">
<Listeners>
<Click Handler="#{GridPanel1}.autoHeight = true; #{GridPanel1}.syncSize(); #{Window1}.hide();" />
</Listeners>
</ext:Button>
</Buttons>


Thx