PDA

View Full Version : [CLOSED] GridPanel.DirectEvent.ColumnResize - How I get the column resized?



supera
Feb 20, 2012, 6:15 PM
Hi

I wish save the size of columns in my GridPanel in Databank.

I am using the directevent ColumnResize.

how do I know which column has been resized?

Thanks for any help!

Daniil
Feb 21, 2012, 5:05 AM
Hi,

A resized column is passed as an argument to the ColumnResize event.
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.panel.Table-event-columnresize

To get its index you can use the Column's getIndex method.
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.grid.column.Column-method-getIndex

So, you can pass the resized column index as a DirectEvent extra parameter.

<ext:Parameter Name="index" Value="column.getIndex()" Mode="Raw" />

supera
Feb 22, 2012, 9:51 AM
Hi Daniil

Thanks a lot for your help...

Using your example, I made this extraparams:



<ext:Parameter Name="colDataIndex" Value="column.dataIndex" Mode="Raw" />
<ext:Parameter Name="colWidth" Value="column.getWidth()" Mode="Raw" />

Daniil
Feb 22, 2012, 10:14 AM
A new width is passed as a separate argument.

So, you could replace:

<ext:Parameter Name="colWidth" Value="column.getWidth()" Mode="Raw" />


with

<ext:Parameter Name="colWidth" Value="width" Mode="Raw" />

supera
Feb 22, 2012, 4:12 PM
Ok! Thanks a lot