I have a grid bound to an Entity Framework-based CollectionViewSource.
For the sake of this example, my columns (left->right) are:
I'm getting an exception when trying to escape editing a new line
I was under the impression that pressing <ESCAPE> was supposed to exit editing mode and pressing it twice on a new line was supposed to discard it. That (the latter) does happen if I've entered no data in the columns or valid data. If I continue (and ignore the exception), the new row is discarded, but I'm concerned because I don't understand what's happening.
When pressing <ESCAPE>, neither the row or cell validation methods are called, which makes sense.
Why is the RadGridView attempting to update the underlying data when it's about to be discarded?
For the sake of this example, my columns (left->right) are:
- Name - in the database this is required, unique, and non-Null
- Serial # - a string
I'm getting an exception when trying to escape editing a new line
- Press <click here to add new item>
- Type in a name
- press <TAB> to advance to serial # column and type in a serial number
- press <BACKTAB> to move focus to Name column
- delete everything in the Name field that you just entered
- Press <ESCAPE> once
I was under the impression that pressing <ESCAPE> was supposed to exit editing mode and pressing it twice on a new line was supposed to discard it. That (the latter) does happen if I've entered no data in the columns or valid data. If I continue (and ignore the exception), the new row is discarded, but I'm concerned because I don't understand what's happening.
When pressing <ESCAPE>, neither the row or cell validation methods are called, which makes sense.
Why is the RadGridView attempting to update the underlying data when it's about to be discarded?