Support for DisplayAttribute

2 posts, 0 answers
  1. Jason
    Jason avatar
    10 posts
    Member since:
    Nov 2006

    Posted 01 Aug 2011 Link to this post

    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

  2. Maya
    Maya avatar
    4062 posts

    Posted 02 Aug 2011 Link to this post

    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. 

    the Telerik team

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

Back to Top