7 Replies Latest reply on Sep 14, 2009 11:00 AM by F.Bowman

    DataGrid Data and Behaviour Modification

    F.Bowman

      stop();

      import fl.events.DataGridEvent;

       

      function endEditHandler(evtObj)
      {
      trace(DataGrid_Main.getItemAt(evtObj.rowIndex)[evtObj.columnIndex]);
      }

       

      DataGrid_Main.addColumn("SSN");
      DataGrid_Main.addColumn("First Name");
      DataGrid_Main.addColumn("Last Name");
      DataGrid_Main.addEventListener(DataGridEvent.ITEM_EDIT_END, endEditHandler);

       

      DataGrid_Main.addItem({});

       

      I have the above AS code. If I edit the row that I add, I get an 'undefined' for the value that I've just entered. Is there any way to get the value that I've just entered?

       

      Also, where can I find a guide for re-programming the behaviour of a DataGrid? For example, if I only have 2 editable columns out of say 7 and after editing the first editable column, I want the cell editor to shift across to the next editable column instead of the next row. Or if the second editable column is edited then the cell editor will drop to the next row in the first editable column. Is there a guide somewhere for that sort of re-programming?