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 / Languages / C# / June 2007

Tip: Looking for answers? Try searching our database.

BindingSource/Custom Object need HasChanges method

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
timnels@gmail.com - 20 Jun 2007 12:41 GMT
I have a custom business object that implements INotifyPropertyChanged
and IEditableObject.  The collection of these objects inherits from
BindingList<T>.  I created a BindingSource from which a grid (list of
objects) and a detail groupbox where bunch of textboxes are bound to
them.

Problem is I need to detect 2 things:

1. A way to know the current record is dirty (meaning any bound
property has changed), so I can enable/disable the Save and Cancel
toolbar buttons.

2. If the user changes data in the detail box and (without saving)
moves to another row in the grid, ask them if they want to update or
cancel the edit.

I know DataSet have several events and methods (like HasChanges), but
I don't know how to handle this when I am binding to a custom object.

Thanks for your help!
timnels@gmail.com - 21 Jun 2007 19:15 GMT
> I have a custom business object that implements INotifyPropertyChanged
> and IEditableObject.  The collection of these objects inherits from
[quoted text clipped - 16 lines]
>
> Thanks for your help!

I think I have the plague.

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.