GridEditableItem editedItem = Parent.NamingContainer as GridEditableItem;
if (editedItem != null)
editedItem.OwnerTableView.IsItemInserted = false;
The check for editedItem.DataItem was just wrong... a good way to do it was checking editedItem.DataSetIndex >= 0
One major nuisance was that the DataSetIndex property seemed to return wrong index when the items were sorted. So I used a workaround with parsing editedItem.KeyValues which were something like "Noderef=\"325325\""