473,509 Members | 6,048 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Automatic Detection of data set changes

I wish to link up the enabled property on a Save button so that it is
set true if any table in the underlying Data set is changed.

I figured that the OnPropertyChanging event in DataSet would be the
correct place to handle this but I have not been able to get it to
work.

Any ideas, cheers Dave
Nov 15 '05 #1
4 1489
muesliflakes wrote:
I wish to link up the enabled property on a Save button so that it is
set true if any table in the underlying Data set is changed.

I figured that the OnPropertyChanging event in DataSet would be the
correct place to handle this but I have not been able to get it to
work.

Any ideas, cheers Dave


Haven't tried it my self but each datatable in the set has a rowChanged
event (i.e. dataSet1.Tables[1].RowChanged ) Hope this helps.
Nov 15 '05 #2
D C
I have considered that, but in my situation a change in any table in the
DataSet would be enough to turn on the Save Button.

I was hoping there was an ability to check at the DataSet level.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 15 '05 #3
D C wrote:
I have considered that, but in my situation a change in any table in the
DataSet would be enough to turn on the Save Button.

I was hoping there was an ability to check at the DataSet level.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


When you load your dataset hook up the RowChanged event of each table
using += to your own single event handler which sets the button when any
of the events is raised.
Nov 15 '05 #4
D C
Thank you for the prompt response Steven, I have found that the
ColumnChange handler is more suited then the RowChange handler for this
situation.

I've included my code for future users.

foreach ( DataTable table in myDataSet.Tables )
{
table.ColumnChanged += new DataColumnChangeEventHandler(
AnyTable_Changed );
}

protected void AnyTable_Changed( object sender,
DataColumnChangeEventArgs e)
{
// Set Button Enabled ture;
}

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 15 '05 #5

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

Similar topics

2
5799
by: gboissiere | last post by:
Hello 'contentEditable' gurus, The example code below uses contentEditable to let the user edit the <div> element directly in their browser. Works also using designMode for the document. ...
6
2070
by: Frank Esser | last post by:
Hallo, I've got a project with about 10 pages. On each of them the user can do data changes (mostly datagrid interactions; the datagrids are bound to datasets). The user is able to jump to...
5
1855
by: The Eclectic Electric | last post by:
I'm very noobish when it comes to Javascript, in fact I wasn't intending to use it at all, but I've got myself distracted by this "problem". I want to use an animated gif as my favicon. This...
58
4608
by: Jorge Peixoto de Morais Neto | last post by:
I was reading the code of FFmpeg and it seems that they use malloc just too much. The problems and dangers of malloc are widely known. Malloc also has some overhead (although I don't know what is...
6
3223
by: subhashkumar | last post by:
Running data Append to a table Dear All, I need a help from this forum, I was developing a small tools for stock market. I get stuck when trying to save the running changes in a data field...
3
4628
by: Peter Hofmann | last post by:
When I change the source code and save it I have currently always to press explicitely F6 zu "compile" the code (and get new error list). Isn't there an automatic build function which is called...
0
1898
by: origami.takarana | last post by:
Intrusion Detection Strategies ----------------------------------- Until now, we’ve primarily discussed monitoring in how it relates to intrusion detection, but there’s more to an overall...
34
3640
by: =?ISO-8859-1?Q?Marcel_M=FCller?= | last post by:
Hi, is there a way to avoid the automatic copy constructor generation. I do not want the object to be non-copyable. I simply do not want that copying is done by the default copy constructor. But...
10
3233
by: Conrad Lender | last post by:
In a recent thread in this group, I said that in some cases object detection and feature tests weren't sufficient in the development of cross-browser applications, and that there were situations...
0
7347
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
7416
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
7506
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...
1
5062
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4732
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3218
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3207
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
779
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
443
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.