This is a migrated thread and some comments may be shown as answers.

Validation Summary repeated errors

2 Answers 61 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
jen
Top achievements
Rank 1
jen asked on 23 Jul 2014, 04:47 PM
I am editing an object that has 5 checkboxes, and a validation rule that at least one must be checked.

During validation I make one Validation result with multiple properties. This way, each checkbox gets a red error indicator.
 new ValidationResult("At least one Finance Type is Required", new List<string>() { "IsCash", "IsFinancePromo", "IsFinanceStandard", "IsLeasePromo", "IsLeaseStandard" });

The problem is that in the validation summary, instead of seeing the error message once, I'm seeing it 5 times.

How can I make the validation summary of the RadDataForm display DISTINCT ValidationResults only?

2 Answers, 1 is accepted

Sort by
0
Boris
Telerik team
answered on 28 Jul 2014, 11:19 AM
Hello Jen,

Have you eventually added the error 5 times? I am not able to reproduce such an issue on this online demo.
In order to guide you better, could you please send us a sample project that reproduces the issue?

Regards,
Boris Penev
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
jen
Top achievements
Rank 1
answered on 28 Jul 2014, 12:36 PM
I figured this out myself. Turns out the error appears in the validation summary once for each binding with NotifyOnValidationError=True set. I had it set on each checkbox, but in this case I only need it set on one.
Tags
DataForm
Asked by
jen
Top achievements
Rank 1
Answers by
Boris
Telerik team
jen
Top achievements
Rank 1
Share this question
or