Add new detail record in MasterDetail RadGridView

1 Answer 23 Views
GridView
Ľubomír
Top achievements
Rank 1
Iron
Ľubomír asked on 04 Dec 2023, 11:28 AM | edited on 04 Dec 2023, 12:16 PM

Hi,

I am trying to add new record into Details in Master Details RadGridView (Based on Telerik Demos/GridView/Editing/Entity Framework CRUD). I added option to add new detail record into master, in row details grid view new row with message "Click here to ad new item" appeared. After clicking on message an filling data in GridViewAddingNewEventArgs, I see new record in the details, but when I try to save it with dbContext.SaveChanges(), I've got message in output window about SQL update statement instead of insert (I always got the EntityFrameworkCore.DBUpdateConcurrencyException). 

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Ľubomír
Top achievements
Rank 1
Iron
answered on 04 Dec 2023, 01:04 PM | edited on 04 Dec 2023, 01:05 PM
Table has identity column and in code, we set the identity value and it cannot be set in code.
Tags
GridView
Asked by
Ľubomír
Top achievements
Rank 1
Iron
Answers by
Ľubomír
Top achievements
Rank 1
Iron
Share this question
or