dotnet windows forms:
I usually create a proc that is then called from any
edited control:
' _loading variable is set to True during setting the
controls' values from the database
Private _loading As Boolean = False
....
Private Sub control_ValueChanged(ByVal sender As Object,
ByVal e As System.EventArgs) Handles txt1.TextChanged,
lst1.SelectedIndexChanged, chk1.CheckedChecked ' and so on
If Not _loading Then
btnSave.Enabled = True
End If
End Sub
HTH.
Please let me know if you need C# version of the code.
[quoted text, click to view] >-----Original Message-----
>Hello
>
>I'm programming with forms against a domain model,
mainly using databinding
>to connect my business objects to my form controls.
>
>The domain object know when stuff has changed, so
whenever the user moves
>out of a edited field, the model is marked as modified
and I can use that to
>for example update the enabled/disabled state of the
save menu item.
>
>However, the user mostly feel that it's natural that the
save button is
>enabled at the moment he types any character into a
field, or do any other
>changes. Long before the databinding updates the value
in the model.
>
>How do you typically solve this issue?
>
>TEK
>
>
>.
Hello
I'm programming with forms against a domain model, mainly using databinding
to connect my business objects to my form controls.
The domain object know when stuff has changed, so whenever the user moves
out of a edited field, the model is marked as modified and I can use that to
for example update the enabled/disabled state of the save menu item.
However, the user mostly feel that it's natural that the save button is
enabled at the moment he types any character into a field, or do any other
changes. Long before the databinding updates the value in the model.
How do you typically solve this issue?
TEK