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

Support for DisplayAttribute

1 Answer 38 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 02 Aug 2011, 12:52 AM

Since it is not built in,  What is the cleanest way to support the DisplayAttribute attribute for DisplayName, GroupName, and Description in the PropertyGrid.

Give the following class

 

 

public class SampleClass

 

{

 

 

    [Display(Name = "A Name Here", GroupName = "Group Name Here", Description="A description here")]

 

 

 

    public string SampleValue { get; set; }

 

}


the propertygrid should recognize the name, groupname, and description


1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 02 Aug 2011, 08:01 AM
Hello Jason,

You may use the corresponding properties of the PropertyDefinition:

<telerik:PropertyDefinition GroupName="Group1" Description="Description1" DisplayName="DisplayName1" />

We will do our best to include support for DataAnnotations in our next official release. 
 

Greetings,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Tags
PropertyGrid
Asked by
Jason
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or