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
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