Yeah... the following excerpts are the pertinent portions of a sample 
that allows the user to change a column width via a numeric stepper.

[Bindable]
private var _surfaceColWidth:int = 80;

<mx:DataGridColumn headerText="Surface" dataField="label" 
showDataTips="true" width="{this._surfaceColWidth}"/>

<mx:NumericStepper id="stepper" value="{this._surfaceColWidth}" 
change="handleStepperChange(event)" color="0x000000" minimum="20" 
maximum="200" stepSize="10"/>                       

private function handleStepperChange(evt:Event):void
{
   var ns:NumericStepper = NumericStepper(evt.currentTarget);
   this._surfaceColWidth = ns.value;
}

hth
Scott

Scott Melby
Founder, Fast Lane Software LLC
http://www.fastlanesw.com
http://blog.fastlanesw.com



markgoldin_2000 wrote:
> Can I bind a column's width to data? so, when that data is changed so 
> is the width?
>
> Thanks
>
>
>   

Reply via email to