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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

validation for property grid

Thread ID:

Created:

Updated:

Platform:

Replies:

123695 Apr 12,2016 07:18 AM UTC Apr 19,2016 09:03 AM UTC WPF 3
loading
Tags: PropertyGrid
Mers Tho
Asked On April 12, 2016 07:18 AM UTC

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. 

Venkateshwaran Ramdoss [Syncfusion]
Replied On 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

Mers Tho
Replied On 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.


Venkateshwaran Ramdoss [Syncfusion]
Replied On 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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;