PDA

View Full Version : Preventing resize event from getting fired when Grid Column's setWidth() is called



webfriend13
15 Jun 2012, 12:58 AM
HI All,

I am looping through grid's columns and setting width of each column based on certain condition. Each time I call setWidth it fires resize event of grid. I want to prevent resize event. Is it possible? I dont want to override the default behaviour.

http://docs.sencha.com/ext-js/4-1/#!/api/Ext.grid.column.Column-method-setWidth

Please provide your suggestions.

sword-it
15 Jun 2012, 3:33 AM
Hi!

you may use Ext.EventManager for preventing firing of resize event.

Just use removeResizeListener or removeListener

For more clarifications, check below links:-
http://docs.sencha.com/ext-js/4-1/#!/api/Ext.EventManager-method-removeResizeListener

http://docs.sencha.com/ext-js/4-1/#!/api/Ext.EventManager-method-removeListener (http://docs.sencha.com/ext-js/4-1/#!/api/Ext.EventManager-method-removeResizeListener)