Use NumericStepper as itemEditor for DataGrid
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
import mx.collections.ArrayCollection;
[Bindable]
private var myData:ArrayCollection = new ArrayCollection([
{dataField1:"Order #1", dataField2:3},
{dataField1:"Order #2", dataField2:3}
]);
</mx:Script>
<mx:DataGrid id="myDG" dataProvider="{myData}" variableRowHeight="true" editable="true" >
<mx:columns>
<mx:DataGridColumn dataField="dataField1" headerText="Order #"/>
<mx:DataGridColumn dataField="dataField2" editorDataField="value">
<mx:itemEditor>
<mx:Component>
<mx:NumericStepper stepSize="1" maximum="50"/>
</mx:Component>
</mx:itemEditor>
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>
</mx:Application>
Related examples in the same category