Hi,
The currency manager has an itemchanged event. That event fires when
the user moves to a new record after making changes.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformscurrencymanagerclassitemchangedtopic.asp
Ken
=====================
[quoted text, click to view] "Steve" <stevea@centurion-ms_RemoveThis_.co.uk> wrote in message
news:O44DJwRWEHA.1164@tk2msftngp13.phx.gbl:
> Hi all
>
> I have been trying to find out what the problem is with the
> dataSet.HasChanges property. It only seems to be updating the second time
> I
> change something. I have done some tests and have seen that, if you call
> the
> EndCurrentEdit for the data-binding and then call the HasChanges, it will
>
> return false because I am calling the HasChanges from within the
> TextChanged
> event of the TextBox, and the TextBox doesn't recognize a change in the
> dataSet until the TextChanged event has been exited.
> ----------------------------------
> Example code:
> Private Sub ChangeTitleByVal sender As Object, ByVal e As
> System.EventArgs)
> Handles txtTitle.TextChanged
> DirectCast(BindingContext(m_oDataSet.Employees),
> CurrencyManager).EndCurrentEdit()
> Button2.Text = m_oDataSet.HasChanges.ToString <-- Will return False the
> first change because we are still in the TextChanged event
> End Sub
> ----------------------------------
> Has anyone else come across this behaviour? Are there any other events
> that
> I could use? Basically, I want a button to be Enabled after changes are
> made
> to the data-bound controls, the change could only be 1 character in 1
> control.
>
> Kind regards,
> Steve.
>
--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (
http://www.grisoft.com).
Version: 7.0.230 / Virus Database: 263.3.6 - Release Date: 6/25/2004