DataGrid bounded to a DataTable with composite key.
-
I have a DataTable with composite key bounded to the DataGrid. So when the user inserts some data which violates the constraint, an exception is thrown. What is the right place (event etc) to do any additional custom Validation? Another problem is the the message that DataTable throws is not user friendly? How can I stop it and give a more meaningful message? The message I got is "Error when committing the row to the original data store"
-
I have a DataTable with composite key bounded to the DataGrid. So when the user inserts some data which violates the constraint, an exception is thrown. What is the right place (event etc) to do any additional custom Validation? Another problem is the the message that DataTable throws is not user friendly? How can I stop it and give a more meaningful message? The message I got is "Error when committing the row to the original data store"
-
Thanks a lot for the reply. I tried this before, but I want the DataGrid to do the actual validation but I want to give a custom message. But in case of the solution you have specified, the DataGrid itself shows a MessageBox with a message which is not use friendly.