Hello!
I have 2 tables Products (ProductID,ProductName, Del) and Sale(id,
productID, qty, price)
Del setted to 1 if user deletes this product.
I have DataGridView and a BindingNavigator which binds to this table.
How can I control the Delete Method of the productsBindingSource everytime
when use tries to delete some product. Because row only is deleted logically
(set Del = 1), so I want to check if there is this product in the table
Sale, if there is- then not allow to delete this product from table Product
and vice verse.
Thanks in advance!
Bart Mermuys - 26 Oct 2006 21:48 GMT
Hi,
> Hello!
> I have 2 tables Products (ProductID,ProductName, Del) and Sale(id,
[quoted text clipped - 6 lines]
> the table Sale, if there is- then not allow to delete this product from
> table Product and vice verse.
Doubt there is anything build in. You probely gonna have to disconnect the
Delete button (see BindingNavigator properties) and then add your own
handler for the delete button, do the processing and then manually delete
the row using the BindingSource.
HTH,
Greetings
> Thanks in advance!
Duong Nguyen - 29 Oct 2006 16:32 GMT
Ok, thank you very much. It works ok now.
> Hi,
>
[quoted text clipped - 18 lines]
>
>> Thanks in advance!