1 Reply Latest reply on Sep 25, 2006 3:11 PM by mltv

    Set focus on a Datagrid Cell

    mltv
      I have an app and after a new row is created I want to set focus to a specific cell so the user can enter a string.
      I have found websites that have methods that worked in the flex 2 Beta but do not work now:
      /////////////////
      The following method is for Flex 2 Beta 1:

      var __focusedCell:Object = new Object();
      __focusedCell.itemIndex = 1;
      __focusedCell.columnIndex = 2;
      dg.setFocusedCell(__focusedCell,true);

      The following method is for Flex 2 Beta 2:

      var __focusedCell:Object = new Object();
      __focusedCell.rowIndex = 1;
      __focusedCell.columnIndex = 2;
      dg.setEditedItemPosition(__focusedCell);

      So the above code would select the cell of 2nd row
      http://www.vaishalimistry.com/2005/12/15/set-focus-on-a-cell-in-datagrid-in-flex-20/
      ///////////////////////

      Anyone know how to make it work in the final software?