More datagrid problems

  • Thread starter Thread starter Derek Chong
  • Start date Start date
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
 
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.
 
Back
Top