Catch Row validating exceptions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using a typed dataset and would like to perform some validations on a
row before it is edited or added to a datatable. I have tried putting
validation in the RowUpdating event (using SetColumnError) however this
doesn't block the row from being added. If I throw an exception this does
block the add, but I can't see to find how to catch the exception because it
throws the exception outside of the addrow inline code. ANy help?

I can't do this because the exception will get thrown in an event outside
the calling method.

Try
AddRowtoTable()

Catch Ex As Exception
'failed to add row because of validation issue
End Try
 
KB,

Why not go trough it in a for index loop, if you cannot find a field, than
know that a STD inherits a normal Dataset.

Cor
 
Back
Top