Binding, bound, autocorrection and validationBinding, bound, autocorrection and validation
Old forum URL: forums.lhotka.net/forums/t/2016.aspx
cultofluna posted on Thursday, December 21, 2006
Hello,
I have a property called Name that is bound to a textbox Text property. The input is checked OnPropertyChanged. Also an ErrorProvider is used.
Here's the problem:
When I type information in the textbox the error provider responds to the validation of the property. Some input errors can be automatically correct, so I've added an autocorrection where the member variable of the property is set to give users more of chance to successfully enter information. However, when I change the value of the member variable the bound textbox does not show the corrected information. My question is Why not?!
Any thoughts?
ajj3085 replied on Thursday, December 21, 2006
Because databinding doesn't requery the property, it assumes the value you entered is the value the object accepted.
The solution is to use the BindingSourceRefresh component in Csla.
HTH
Andy
cultofluna replied on Thursday, December 21, 2006
Thanks alot, I will try it asap and post results!
xal replied on Thursday, December 21, 2006
Are you calling PropertyHasChanged when you change the variable??
Andrés
Copyright (c) Marimer LLC