Deletions should always come first in Data grid editing
started a topic
over 8 years ago
[This topic is migrated from our old forums. The original author name has been removed]
It seems that the data grid currently applies changes one at a time starting from the top of the grid.
I recently noticed that you can cause primary key errors pretty easily by:
# Entering the data tab of a table, selecting all rows and copying them to the clipboard.
# Marking all rows for deletion.
# Clicking on any row except the last one, adding a new row then pasting the data form the clipboard.
# Saving the data changes.
This could be solved by ensuring all deletions are applied prior to any inserts when saving data grid changes. Similarly, updates should occur before inserts to prevent similar issues.
If you need me to elaborate on this let me know and I'll sumbit a more detailed report.