I need to find the data key value (the identity value) of a record immediately after it is inserted. I tried the GetDataKeyValue method on the GridEditFormInsertItem in the ItemInserted event but it is coming back null. See below...
GridEditFormInsertItem i = (GridEditFormInsertItem)e.Item;
string keyValue = i.GetDataKeyValue("id").ToString();
I am able to this in the ItemUpdated using almost the exact same code...
GridEditableItem i= (GridEditableItem)e.Item;
string keyValue = i.GetDataKeyValue("id").ToString();
and that works.
Anyone know how to do this?