How can I do validation and stop databinding when validation failed?
for example, if a user type 1234 for a firstName texbox which has the following binding: this.textBoxFirstName.DataBindings.Add("Text", personObj, "FirstName");
Thanks!
How can I do validation and stop databinding when validation failed?
for example, if a user type 1234 for a firstName texbox which has the following binding: this.textBoxFirstName.DataBindings.Add("Text", personObj, "FirstName");
Thanks!
Use BindingComplete and/or Parse events of Binding
class.
Or use control's validation functionality, which is preferable. Or use some kind of mask editor. Mask editor would be better from the usability point of view.