Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Data Binding / October 2006

Tip: Looking for answers? Try searching our database.

how to control Delete Method?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Duong Nguyen - 26 Oct 2006 15:52 GMT
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!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.