5/11/2011 6:25:53 AM
Title:
flex
i want to insert data in textinput within itemrenderer and collect in arraycollection
5/11/2011 7:24:57 AM
call a function in the root of your application from item renderer and pass the text to that function. That function will receive the text and add that text to the array collection.
5/12/2011 5:04:42 AM
Hi,
Might be this example will help u.
<?xml version="1.0"?>
<!-- itemRenderers\dropin\DropInNumStepper.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
[Bindable]
private var myDP:ArrayCollection = new ArrayCollection([
{label1:"Order #2314", quant:3, Sent:true},
{label1:"Order #2315", quant:3, Sent:false}
]);
]]>
</mx:Script>
<mx:DataGrid id="myDG" dataProvider="{myDP}"
variableRowHeight="true"
editable="true" >
<mx:columns>
<mx:DataGridColumn dataField="label1" headerText="Order #"/>
<mx:DataGridColumn dataField="quant"
headerText="Qty"
itemEditor="mx.controls.NumericStepper"
editorDataField="value"
/>
</mx:columns >
</mx:DataGrid>
</mx:Application>
you can use "mx.controls.TextInput" insted of mx.controls.NumericStepper.