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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Using DisplayAttribute on property grid

Thread ID:





130476 May 15,2017 09:46 AM UTC May 16,2017 11:40 AM UTC WPF 1
Tags: PropertyGrid
Asked On May 15, 2017 09:46 AM UTC


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

Keerthana Jegannathan [Syncfusion]
Replied On 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 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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