Hi,
Please let me know how to validate mutiple textboxes in Silverlight3 on LostFocus event. I tried with LostFocus event but the application gets hanged for tab changes.
private void txtFirstName_LostFocus(object sender, RoutedEventArgs e)
{
txtFirstName.ClearValidationError();
if (string.IsNullOrEmpty(txtFirstName.Text))
{
txtFirstName.SetValidation("Please enter First Name");
txtFirstName.RaiseValidationError();
IsValid = false;
txtFirstName.Focus();
}
}
Thanks in advance.
Loading
vijay ragsPosted Sep 21, 2011, 5:31 AM
NotifyOnValidationError=true
ValidatesOnExceptions=true
events in .xaml file.
Please let me know if there any other option.
Thnaks,
vijay ragsPosted Sep 21, 2011, 5:29 AM
Priya LingePosted Sep 21, 2011, 3:38 AM
Hi,
Please check attached code.In this code i have 3 classes which is made for
validation(we can validates multiple textboxes here).
1.BindValidation.cs
2.Extention.cs
3.CustomeValidation.cs
Hope this will help you.
Thanks.
Jaganathan BantheswaranPosted Sep 21, 2011, 2:55 AM
Just follow this.
Validating Textbox on Lost Focus in RIA Service, Silverlight 4