Dec 22, 2009 at 9:21 AM
Edited Dec 22, 2009 at 9:24 AM
Thanks for your reply Valiant,
Here is my reply.
Please check if you have the correct full type name in the SourceTypeName
property of the ValidationProvider control
Answer: Its specified properly with the full name, as the validate event displays the error messages as expected.
SourcePropertyName: Even this is configured properly and
PerformValidation on ValidationProvider is set to True
I dont have a sample, but let me explain what I did.
Step 1: Build a class with the properties for the fields to be validated.
Step 2: Use the configuration tool, refer the assembly and include the fields and add the necessary validations.
Step 3: Insert a validation provider, then assign the SourceTypeName
and RuleSetName property
Step 4: Assign the SourcePropertyName to all the controls that need to be validated and PerformValidation on ValidationProvider to
Step 5: Create a validator using the method ValidationFactory.CreateValidator
Step 6: Call the results = validator.Validate() method.
Step 7: Now I can see all the validation messages in the results
But when I execute the below statements I don't see anything happening. I am expecting the error icon to blink if there is an error.
this.EventValidationProvider.Enabled = true;
I have a ErrorProvider control and for the controls to be validated, I have set the following properties
1. Error on ErrorProvider = 'ErrMsg'
2. PerformValidation on ValidationProvider = True
3. SourcePropertyName on ValidationProvider = Property in the class
I am not sure, what could be wrong.
It would be of great help if you can assist me.