2 Replies Latest reply on Oct 5, 2010 2:17 AM by Ibarim

    dataGrid: make only 1 row editable and enabled

    Ibarim Level 1

      Hi,

       

      I want to make a dataGrid, which has an edit mode. During this edit mode I need just one row to be editable and the rest rows should be disabled. I'm not sure how to accomplish that.

       

      I managed to create dataGrid, which have just one row editable by calling this function on 'itemEditBegining' event:

       

      private function prevDefault(e:DataGridEvent):void {
      if (e.rowIndex != currentIndex) e.preventDefault();
      }

       

      But still I have to find a way to disable other rows. I was trying to do that by calling above function on 'itemFocusIn' event, but didn't work.

      Calling 'preventDefault' method on 'change' event also didn't work.