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

ICustomTypeDescriptor object validation

1 Answer 27 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
Vladimir
Top achievements
Rank 1
Vladimir asked on 13 May 2014, 06:40 AM
RadDataForm does not validates correctly objects inherited from ICustomTypeDescriptor because it uses standard Validator.TryValidateObject method which works with standard reflection. Insteed it must use internal dynamic PropertyDescriptors and validate object by them.

RadDataForm.cs: 
public bool ValidateItem()
        {
            //...
            Validator.TryValidateObject(CurrentItem, new ValidationContext(CurrentItem, null, null), validationResults, true);
            //...
        }

1 Answer, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 15 May 2014, 02:51 PM
Hi Vladimir,

Would you please clarify, how do you implement your validation rules? We would appreciate a sample dummy project with your scenario that we can test on our side.

Regards,
Ivan Ivanov
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.
 
Tags
DataForm
Asked by
Vladimir
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Share this question
or