private var _included : Boolean;
public function get included():Boolean{
return this._included;
}
public function set included(value:Boolean):void
this._included = value;
this.dispatchEvent(new Event('includedChanged');
}
<mx:DataGridColumn headerText="Antal" headerStyleName="gridheader" width="40" dataField="antal" editorDataField="value" editable="true">
<mx:itemRenderer>
<fx:Component>
<mx:Label dataChange="onDataChange()" >
<fx:Script>
<![CDATA[
public function onDataChange():void{
thistext = data['Antal'];
this.data.addEventListener('includedChanged',onIncludedChange);
}
public function onIncludedChange(e:Event):void{
this.text = data['Antal'];
}
]]>
</fx:Script>
</mx:Label>
</fx:Component>
</mx:itemRenderer>
<mx:itemEditor>
<fx:Component>
<mx:NumericStepper stepSize="1" width="35" height="20" focusOut="numericstepper1_changeHandler(event)">
<fx:Script>
<![CDATA[
import mx.events.NumericStepperEvent;
override public function set data(value:Object):void{
super.data = value;
if (value && value.hasOwnProperty("minNo"))
minimum = value.minNo;
if (value && value.hasOwnProperty("maxNo"))
maximum = value.maxNo;
}
protected function numericstepper1_changeHandler(event:Event):void
{
if(data.antal > 0)
data.included = true;
else
data.included = false;
}
]]>
</fx:Script>
</mx:NumericStepper>
</fx:Component>
</mx:itemEditor>
</mx:DataGridColumn>