Building items in PropertyGrid at design-time

2 posts, 0 answers
  1. Sri
    Sri avatar
    5 posts
    Member since:
    Mar 2014

    Posted 01 May 2014 Link to this post

    Is there a way to build the set of Categories and Items shown in a PropertyGrid at design-time?  I realize that the focus of the PropertyGrid control is to dynamically bind to an object to allow access to changing the object's property values, so this may be outside of the original purpose of the PropertyGrid control.  I really like the look and feel of the PropertyGrid with being able to organize fields by categories and provide custom editors for changing the values, and so I'm looking to be able to setup the PropertyGrid at design-time with my own pre-defined set of Categories, and then add Items under each Category, and databind each Item's value to an object's property.  Similar to how you build the columns of a DataGridView at design-time, and set the "DataPropertyName" that you want that column to be bound to.

    It doesn't appear that you can do this directly with the current RadPropertyGrid control, but is there way to get this kind of functionality using RadPropertyGrid, or another Telerik control that would offer this?
  2. Peter
    Peter avatar
    1148 posts

    Posted 02 May 2014 Link to this post

    Hi Sri,

    Thank you for writing.

    RadPropertyGrid control is created to browse, view, and edit the properties of the objects. The control displays properties for any object or type, and it retrieves the item's properties, using reflection. 
    You can set RadPropertyGrid to display properties of object at design time (see the attached screenshot) but this object should be an static and the filtering, sorting and editing of the object cannot be set in design time (via property builder or properties).
    For example you should do your own filtering via code:
    FilterDescriptor filter = new FilterDescriptor("Name", FilterOperator.Contains, "size");

    For more information about filtering please, refer this help article.

    I hope this helps.

    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
Back to Top