I am having an issue when inserting the first child in a parent/child grid. The insert is sent to the DB and the stored procedure inserts the correct data and generates a guid for the key on the newly inserted row. I know radGrid is getting this guid back, but I can't figure out how to get it in the ItemInserted event. Code in the iteminserted:
The issue is that scope.ItemIndex is always -1 and DataKeyValues.Count == 0. How else can I extract the new key?
GridEditableItem scope = e.Item as GridEditableItem; |
try |
{ |
CalculateDates((Guid)scope.OwnerTableView.DataKeyValues[scope.ItemIndex]["ScopeID"]); |
} |
The issue is that scope.ItemIndex is always -1 and DataKeyValues.Count == 0. How else can I extract the new key?