Returning data from an item editor : DataGrid ItemEditor « Grid « Flex






Returning data from an item editor

Returning data from an item editor
     

<?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, BooleanValueColumn:true},
            {dataField1:"Order #2", dataField2:3, BooleanValueColumn:false}
        ]);
      
    </mx:Script>
    <mx:DataGrid id="myDG" dataProvider="{myData}"
        variableRowHeight="true" editable="true">
        <mx:columns>
            <mx:DataGridColumn dataField="dataField1" headerText="Order #" />
            <mx:DataGridColumn dataField="dataField2" itemEditor="mx.controls.NumericStepper" editorDataField="value" />
        </mx:columns>
    </mx:DataGrid>
</mx:Application>

   
    
    
    
    
  








Related examples in the same category

1.Use ComboBox as itemEditorUse ComboBox as itemEditor
2.Use an inline item editor, rather than a componentUse an inline item editor, rather than a component
3.Using a DateField or ComboBox control as a drop-in item editorUsing a DateField or ComboBox control as a drop-in item editor
4.Define an event listener for the itemEditEnd event that uses the NumberFormatter class to format cell valueDefine an event listener for the itemEditEnd event that uses the NumberFormatter class to format cell value
5.Use itemEditEnd event to ensure that the user did not enter an empty StringUse itemEditEnd event to ensure that the user did not enter an empty String
6.To prevent cell editing, call the preventDefault() method from within your event listenerTo prevent cell editing, call the preventDefault() method from within your event listener
7.Show an event listener for itemEditEnd event using column index, row index, and value propertiesShow an event listener for itemEditEnd event using column index, row index, and value properties
8.Inline CheckBox Editor With OffsetsInline CheckBox Editor With Offsets
9.Use mx.controls.NumericStepper as DataGridColumn editorUse mx.controls.NumericStepper as DataGridColumn editor
10.use to define an inline item editoruse <mx:Component> to define an inline item editor
11.inline item editor contains a single control that supports the data propertyinline item editor contains a single control that supports the data property
12.DataGrid Dropin Editor
13.Inline DataGrid EditorInline DataGrid Editor
14.Cancel the edit action and maintain edit stateCancel the edit action and maintain edit state
15.Get cell index in cell onEditEnd eventGet cell index in cell onEditEnd event
16.Edited Row and columnEdited Row and column
17.Item Editor Size and PositionItem Editor Size and Position
18.Item Edit Beginning EventItem Edit Beginning Event
19.Item Edit End EventItem Edit End Event