473,395 Members | 1,624 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,395 software developers and data experts.

BindingSource/Custom Object need HasChanges method

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
1 2885
On Jun 20, 7:41 am, timn...@gmail.com wrote:
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!
I think I have the plague.

Jun 21 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

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()...
1
by: Leonardo | last post by:
Hi. I'm trying to build my first application with database access using VB 2005. I'm a VB 6 programmer and learning everything again has been challenging. I managed to write a code using some tips...
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...
0
by: LieWait | 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 grid...
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...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.