Search Flex Components Free

Custom Search

December 25, 2007

Flex Cell Renderers Control Drop In NumericStepper Source Code


Flex Sample Source Code:

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="initApp()" backgroundAlpha="0">

<mx:Script>

import mx.collections.*;

[Bindable]
public var cart:ArrayCollection;

private function initApp():void
{
cart = new ArrayCollection([
{product: "Apples", qty: 2},
{product: "Oranges", qty: 1},
{product: "Bananas", qty: 5}
]);
}

</mx:Script>

<mx:DataGrid dataProvider="{cart}" width="300" editable="true" variableRowHeight="true">
<mx:columns>
<mx:Array>
<mx:DataGridColumn dataField="product" headerText="Product"/>
<mx:DataGridColumn dataField="qty" headerText="Qty" rendererIsEditor="true" itemRenderer="mx.controls.NumericStepper" editorDataField="value"/>
</mx:Array>
</mx:columns>
</mx:DataGrid>

</mx:Application>







Related Flex Tutorials