0 Replies Latest reply on Oct 3, 2008 3:08 AM by Sankar Kethineni

    Editing and storing DataGrid values

    Sankar Kethineni Level 1
      Hi All,

      we can get the value of selected item in the datagrid by saying todoDataGrid.selectedItem.task/category/priority... right?

      Now am trying to edit the datagrid value and wants to store in the DB. Am calling a method called editEnd on ItemEditEnd event of Datagrid and in that method am trying to get the edited value by using the above mentioned technique , but it is not coming and is there any method to get the values based on rowIndex?(we can get the rowIndex on DataGridEvent as in editEnd(event:DataGridEvent))


      Any help is appriciated !


      <mx:DataGrid id="todoDatagrid" textRollOverColor="#996633" height="{parent.height/2}"
      borderStyle="outset" dataProvider="{todoItems}" width="100%"
      itemEditEnd="editEnd(event)" editable="true">
      <mx:columns>
      <mx:DataGridColumn id="task" headerText="Task" dataField="task" />
      <mx:DataGridColumn id="category" headerText="Category" dataField="category">
      <mx:DataGridColumn headerText="Priority" dataField="priority" />
      </mx:columns>
      </mx:DataGrid>



      private function editEnd(e:DataGridEvent):void
      {
      Alert.show("in editend rowindex==" +e.rowIndex);
      ...................
      }