         
         dataGridEvent.columnIndex = editedItemPosition.columnIndex;
         dataGridEvent.column = itemEditorInstance.column;
-        dataGridEvent.rowIndex = editedItemPosition.rowIndex;
+        dataGridEvent.rowIndex = dataGrid.dataProvider ? dataGrid.dataProvider.getItemIndex(itemEditorInstance.data) : -1;
         dataGrid.dispatchEvent(dataGridEvent);
     }
     

        inEndEdit = true;
        
        var itemPosition:Object = editedItemPosition;
        if (!saveItemEditorSession())
        {
            // The save was cancelled so check if the editor can be cancelled.

        // GRID_ITEM_EDITOR_SESSION_SAVE events are NOT cancelable
        dataGridEvent.columnIndex = itemPosition.columnIndex;
        dataGridEvent.column = dataGrid.columns.getItemAt(itemPosition.columnIndex) as GridColumn;
        dataGridEvent.rowIndex = dataGrid.dataProvider ? dataGrid.dataProvider.getItemIndex(editedItem) : -1;
        dataGrid.dispatchEvent(dataGridEvent);

        inEndEdit = false;
