PC Review


Reply
Thread Tools Rate Thread

Detect changes on dataset!

 
 
Innocenti Eros
Guest
Posts: n/a
 
      11th Jan 2008
Hi all,
this is my first message in this newsgroup.
I have a question about the correct way to detect changes made on dataset.

Actually i have triggered enter and leave events of my bound textbox adding
or removing an handler for textchanged event.
I don't know if this is a good practice..

Is it possible in some way to bind the dataset haschanged() method to a
button visible property?

Is there another better way to do this?

Very thanks and sorry for my poor english
Eros.

 
Reply With Quote
 
 
 
 
Scott M.
Guest
Posts: n/a
 
      12th Jan 2008
A DataSet automatically records changes made to it by marking the rows
affected as dirty. This is how DataAdapters are able to know what changes
are to be pushed back to the original data source when DataAdapter.Update()
is called. The changes are maintained in the DataSet via the RowState
property, which is explained here:

http://www.akadia.com/services/dotnet_rowstate.html

Good luck.

-Scott




"Innocenti Eros" <(E-Mail Removed)> wrote in message
news:38A289DE-9A7F-4CE4-9328-(E-Mail Removed)...
> Hi all,
> this is my first message in this newsgroup.
> I have a question about the correct way to detect changes made on dataset.
>
> Actually i have triggered enter and leave events of my bound textbox
> adding or removing an handler for textchanged event.
> I don't know if this is a good practice..
>
> Is it possible in some way to bind the dataset haschanged() method to a
> button visible property?
>
> Is there another better way to do this?
>
> Very thanks and sorry for my poor english
> Eros.



 
Reply With Quote
 
Alec MacLean
Guest
Posts: n/a
 
      16th Jan 2008
Hi Eros,

The dataset has a change flag indicator, which you could use something like
this in your textbox text_changed event handler:

me.cmdMyButtonName.Visible = myDatasetName.HasChanges

Which may suit your needs.

Al

"Innocenti Eros" <(E-Mail Removed)> wrote in message
news:38A289DE-9A7F-4CE4-9328-(E-Mail Removed)...
> Hi all,
> this is my first message in this newsgroup.
> I have a question about the correct way to detect changes made on dataset.
>
> Actually i have triggered enter and leave events of my bound textbox
> adding or removing an handler for textchanged event.
> I don't know if this is a good practice..
>
> Is it possible in some way to bind the dataset haschanged() method to a
> button visible property?
>
> Is there another better way to do this?
>
> Very thanks and sorry for my poor english
> Eros.



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: detect change in dataset William Ryan eMVP Microsoft Dot NET 0 25th May 2004 08:10 PM
Re: detect change in dataset Andy Gaskell Microsoft Dot NET 0 25th May 2004 07:25 PM
How to detect an empty DataSet =?Utf-8?B?R3JhbnQgT3Jk?= Microsoft ASP .NET 3 12th Mar 2004 07:41 PM
Re: Detect the DataSet.Clear method Dmitry Arefiev [gs-soft.ru] Microsoft ADO .NET 1 7th Oct 2003 08:31 PM
Re: Detect the DataSet.Clear method Greg Microsoft ADO .NET 0 7th Oct 2003 06:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:40 AM.