More datagrid problems

D

Derek Chong

How do you trap the unhandled exception thrown when you violate a unique
constraint on the datatable underlying a datagrid.

The exception is thrown when you enter duplicate value then change the
selected cell. There seems to be a hidden datagrid event that calls the
datatable.AcceptChanges method everytime you change the selected cell. No
problems with the exception but how do you trap it?

Any clues?
Derek
 
D

Derek Chong

Try and Catch only works if you are incontrol of the program flow, in this
case I am accepting input directly from the screen and updating the
datatable via a databinding on the control.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top