G
Guest
Hi
I have a form with a datagrid whose source datatable is filled WITHOUT BEING FIRST CLEARED each time the use
selects a different value in a Parent Listbox control. The datagrid's source datatable has Primary Key constraints. I would like to
be able to capture the Data.ConstraintException that is thrown is a user tries to insert a duplicate row in the datatable, and auto
matically remove the duplicate row. I am wondering what the best strategy would be to do this? Should I use a Try..Catch..EndTry
in the listbox's selected value changed handler, which is where the source datatable is filled? I think this is the right track, but I a
a little lost on where to go from here. Any help would be appreciated
JT
I have a form with a datagrid whose source datatable is filled WITHOUT BEING FIRST CLEARED each time the use
selects a different value in a Parent Listbox control. The datagrid's source datatable has Primary Key constraints. I would like to
be able to capture the Data.ConstraintException that is thrown is a user tries to insert a duplicate row in the datatable, and auto
matically remove the duplicate row. I am wondering what the best strategy would be to do this? Should I use a Try..Catch..EndTry
in the listbox's selected value changed handler, which is where the source datatable is filled? I think this is the right track, but I a
a little lost on where to go from here. Any help would be appreciated
JT