I have a simple problem but maybe it is not.
I've 2 textfield in a form (and other controls).
When I open the form data are loaded form a DB and the view is fulfilled.
If I type something in the first field, something else should be automatically added to the second.
Then I've a save button that save everything (and the 2 fields too)
I wrote many very bad codelines (shame on me) but I didn't find a clean solution.
1st version has been using the TextChanged event on the 1st field.
This has the issue that fires every character and also if I set the text of the 1st field by code when the view is created
2nd version has been using FocusChanged event on the 1st field.
This has the issue that fires only if I change the focus on another textfield; if I click on a button the event is not executed (stay in queue until I didn't click on another field)
I'm sure my scenario is not particular.
So I think some good solution should be available but I cannot find it.
Thanks in advance for every clue.
dex
PS. Sorry for my English I hope the request is clear enaough.
I've 2 textfield in a form (and other controls).
When I open the form data are loaded form a DB and the view is fulfilled.
If I type something in the first field, something else should be automatically added to the second.
Then I've a save button that save everything (and the 2 fields too)
I wrote many very bad codelines (shame on me) but I didn't find a clean solution.
1st version has been using the TextChanged event on the 1st field.
This has the issue that fires every character and also if I set the text of the 1st field by code when the view is created
2nd version has been using FocusChanged event on the 1st field.
This has the issue that fires only if I change the focus on another textfield; if I click on a button the event is not executed (stay in queue until I didn't click on another field)
I'm sure my scenario is not particular.
So I think some good solution should be available but I cannot find it.
Thanks in advance for every clue.
dex
PS. Sorry for my English I hope the request is clear enaough.