We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

validation for property grid

Hi, I would like to ask that is it possible to make a validation for the fields of property grid in current version of syncfusion property grid?
For example : I have an age field in the property grid, I want to set the minimum value of 2 and maximum value of 8. is there any easy way to do that? like I'm able to setting the range in attribute while using different property grid. 

3 Replies

VR Venkateshwaran Ramdoss Syncfusion Team April 13, 2016 01:04 PM UTC

Hi Tho,

We have prepared a sample based on your requirement. In this sample, we have used CustomEditor and UpDown control. In UpDown control, we have used MinValue and MaxValue properties to set the validation of Integer. Please download the sample from the below attachment.

Regards,
Venkateshwaran V.R.

Attachment: PropertyGridSample1_96da9086.zip


MT Mers Tho April 18, 2016 06:56 AM UTC

Hi, thank you for the reply. It is useful.
However, if following the sample you had given, all my int property type will have the same validation. If I want to just make the validation on particular field?
For example,  I have two int type which are age and year. For age, I want to set it min 2 and max 8, but year is min 1920, max 2000. something like that.



VR Venkateshwaran Ramdoss Syncfusion Team April 19, 2016 09:03 AM UTC

Hi Tho,

We have prepared a sample based on your requirement. In this sample, we have set the validation for the particular field by comparing the property name using 'propertyInfo.Name'. Please download the sample from the attachment.

Regards,
Venkateshwaran V.R.

Attachment: PropertyGridSample1_e0d3c1ed.zip

Loader.
Up arrow icon