3 Replies Latest reply on Jul 24, 2007 3:53 AM by Hugo_Core

    Datagrid Bug ?

    Hugo_Core Level 1
      Hi All, how u doing..

      Heres what happen i have a DataGrid with a custom ItemEditor

      <mx:itemEditor><mx:Component><mx:TextInput text="{data.cod_artigo}"
      focusIn="valorInicial(data.cod_artigo);"
      focusOut="verificaValor(this.text);">
      <mx:Script>
      Bla bla bla bla..

      All works fine, but if I press the ENTER key to accept the changes:

      TypeError: Error #1009: Cannot access a property or method of a null
      object reference.
      at
      mx.controls::DataGrid/mx.controls:DataGrid::editorKeyDownHandler()[C:\dev\flex_2\
      01_gmc\sdk\frameworks\mx\controls\DataGrid.as:4581]


      -------------------

      @ Datagrid.as

      // multiline editors can take the enter key.
      if (columns[_editedItemPosition.columnIndex].editorUsesEnterKey)
      return;

      -------------------

      In fact ( i don't know why ) : _editedItemPosition = null


      So, can you help workaround this ?

      Deply Thanks,
      Core