I have an EditableRootListBase object bind with DataGridViev by Bindingsource object. The problems starts when database error occur (ex. Primary key validation – database is Postgresql) , I get an unhandled exception.
My intentions is to catch that exception in UI layer, provide processed message to user and set original data back in the grid. I’ve tried event handler DataError in grid and in Bindingsource , but it doesn’t work.
Could you tell me where can I catch that exception or how can I handle it other way?
Ok, sorry for bothering in that issue, I’m quite new in that area. It was VS "feature" , connected with “user-handled exception”. After changing that settings I was able to catch an error in DataError handler in DataGridView.
Copyright (c) Marimer LLC