Bart,
You have solved the problem no one else has! Great idea!
Here is how I implemented it.
private void dataNavigator_PositionChanged(...)
{
btnSave.Enabled = false;
if ( _RWAccess ) { timer.Enabled = true; }
}
private void timer_Tick(...)
{
if
(((DataRowView)bs1Office.Current).Row.HasVersion(DataRowVersion.Proposed))
{
timer.Enabled = false;
btnSave.Enabled = true;
}
}
You have saved me an incredible amount of work!
Thanks
Jim
[quoted text, click to view] "Bart Mermuys" <bmermuys.nospam@hotmail.com> wrote in message
news:c_5wh.319670$vW6.6304826@phobos.telenet-ops.be...
> Hi,
>
> "Jim Rand" <jimrand@ix.netcom.com> wrote in message
> news:ek9ZRK$QHHA.4916@TK2MSFTNGP03.phx.gbl...
>> Let's say you have a form with a bunch of text boxes bound to a binding
>> source. The form also has a "Save" button which you want enabled only if
>> the user has made changes. The Save button will call
>> bindingSource.EndEdit() and will then instruct the dataset to update the
>> database.
>>
>> Other than catching the text control's EditValueChanged event, is there a
>> simpler way that applies to the whole form?
>
> No ,don't think so, it seems to be a missing feature.
>
> If you are binding to ADO.NET, you could use:
> ((DataRowView)BindingSource.Current).Row.HasVersion(DataRowVersion.Proposed)
> to check for changes, but as someone previously pointed out, there isn't
> an event you can handle for this.
>
> HTH,
> Greetings
>
>
>
>>
>> It would be nice if the binding source had a IsDirty property that is set
>> to true prior to the EndEdit().
>>
>>
>>
>
>