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

Using DisplayAttribute on property grid


I have a portable class library that includes some shared data classes.

The PCL does not have support for the attributes that are required by property Grid. For example, the following code does not compile:

DescriptionAttribute("Name of the actual person.")]
public string Name {get;set;}

Is there any way to use DisplayAttribute instead and make the PropertyGrid to see those values? Something like the following:

 [Display(Name = "Name", GroupName = "Identity", Description = "Name of the actual person")]
 public string Name {get; set;}

Thank you

1 Reply

KJ Keerthana Jegannathan Syncfusion Team May 16, 2017 11:40 AM UTC

Hi Nektarios, 
Thank you for contacting Syncfusion support. 
In our current implementation, we have taken the description using the “DescriptionAttribute” in PropertyGrid. Therefore, it is not possible to use own attributes or attributes other than DescriptionAttribute to get the display values of the properties in it. Please let us know whether if you need further assistance on this. 
Keerthana J 

Live Chat Icon For mobile
Up arrow icon