473,386 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

BindingSource/Custom Object need HasChanges?

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!
Jun 20 '07 #1
0 1048

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Michael Rodriguez | last post by:
I have a custom business object collection based on the CSLA.NET framework from Rockfor Lhotka's "Expert C# Business Objects" book. I bound my winform to the object and when I open the screen the...
1
by: TN | last post by:
I just don't get the BindingSource class when it is bound to a class. Consider this code snip: ..... Private bSource As New BindingSource() Private dgv As New DataGridView() Public Sub New()...
2
by: Steve | last post by:
Hi- OK, I've got a DataGridView, I've created a BindingSource from one of my Business Entity object (based on generated classes from EntitySpaces) I've left the default column setup so that all...
2
by: Rob Dob | last post by:
How do I determine if there are any rows within the BindingSource that have changed prior to calling the EndEdit(). I need to do this in order to archive some records and if I call the EndEdit()...
0
by: w31chang | last post by:
Hi, I create custom entity objects, a custom collections for the entity objects and a custom object that acts like a collection of the custom entity collections which I called EntitySet Object. The...
1
by: timnels | last post by:
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...
1
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Hi misters, I used the Data Sources window to drop a custom object onto the designer surface. It created a BindingSource and BindingNavigator as a result. When I open the Properties window...
5
by: jehugaleahsa | last post by:
Hello: I am sure this question comes up a lot. I need to disable the controls on my Windows forms so that when the BindingSource is empty some the controls bound to it will be disabled. This...
2
by: TamusJRoyce | last post by:
I am working on a group project where I do not have access to a BindingSource that is being passed through a function. The BindingSource's DataSource is set to a custom IBindingListView Collection....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.