Grid Flex



    width="700">
    
        
        import mx.events.DataGridEvent;
        import mx.collections.ArrayCollection;
        import mx.controls.TextInput;
        public var newCity:String;
        public var newState:String;
        [Bindable]
        public var initDG:ArrayCollection = new ArrayCollection([
            {Company: 'A', Contact: 'AA',Phone: '123-555-1212', City: 'Boston', State: 'MA'},
            {Company: 'B', Contact: 'BB',Phone: '123-555-3434', City: 'SanFrancisco', State: 'CA'}
        ]);
        public function processData(event:DataGridEvent):void {
            if(event.dataField=='City/State'){
                event.preventDefault();
                myGrid.editedItemRenderer.data.City = myEditor(myGrid.itemEditorInstance).setCity.text;
                myGrid.editedItemRenderer.data.State = myEditor(myGrid.itemEditorInstance).pickState.selectedItem;
                myGrid.destroyItemEditor();
                myGrid.dataProvider.itemUpdated(myGrid.editedItemRenderer);
            }
        }
      
    

            editable="true" itemEditEnd="processData(event);">
        
            
            
            
            
                
                    
                                                    text="{data.City}, {data.State}" />
                    

                

                
                    
                        
                            
                            
                                
                                    AL
                                    AK
                                    AR
                                    CA
                                    MA