Hi,
> 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
[quoted text clipped - 4 lines]
> 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().
Jim Rand - 31 Jan 2007 20:49 GMT
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
> Hi,
>
[quoted text clipped - 19 lines]
>> It would be nice if the binding source had a IsDirty property that is set
>> to true prior to the EndEdit().