Hi,
I need to get the dataKey of the newly added row after automatic insert in a RadGrid.
It's possible to get it with the ItemInserted event function?
I tried to get the dataKey like as
But this code works only in the ItemUpdated case.
I need to get the dataKey of the newly added row after automatic insert in a RadGrid.
It's possible to get it with the ItemInserted event function?
I tried to get the dataKey like as
| protected void MyRadGrid_ItemInserted(object o, GridInsertedEventArgs e) |
| { |
| if (e.Exception != null) |
| { |
| e.ExceptionHandled = true; |
| //Error messsage here |
| } |
| else |
| { |
| GridEditableItem An_item = (GridEditableItem)e.Item; |
| int The_data_key = int.Parse(An_item.GetDataKeyValue("Id").ToString()); |
| } |
| } |