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

Example of ValueRange

1 Answer 52 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Hong
Top achievements
Rank 1
Hong asked on 06 Feb 2015, 06:28 PM
I am wondering if anyone could point me to an example of using attribute ValueRange in a model for DataForm control.
The following usage is not allowed.

        [ValueRange(MaxValue=100, MinValue=0)]
        public int Quality
        {
            get;
            set;
        }

1 Answer, 1 is accepted

Sort by
0
Ivaylo Gergov
Telerik team
answered on 11 Feb 2015, 02:51 PM
Hi,

The ValueRange attribute requires its MaxValue and MinValue properties to be of type double. For example:

[ValueRange(MaxValue = 100.0, MinValue = 0.0)]

Please, let me know should you need further assistance.

Regards,
Ivaylo Gergov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
DataForm
Asked by
Hong
Top achievements
Rank 1
Answers by
Ivaylo Gergov
Telerik team
Share this question
or