Not sure I understand exactly the issue. Why do you call InsertionRow.BringIntoView()? Isn’t the InsertionRow already visible when a row is being added to the grid, since this is the user inserting a row in the grid?
Does your primary key supports duplicates? If not, it would explain the exception. If you use a unique primary key (one not present in the data source), does it work?
If so, you have a few choices. Always use unique primary keys, or set your DB to accept duplicates, or if the primary key is an integer, you can set the DB to automatically generate the key when a row is inserted (the grid will automatically update with the right number when a row is inserted).
Imported from legacy forums. Posted by André (had 1241 views)