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

Building items in PropertyGrid at design-time

1 Answer 46 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Sri
Top achievements
Rank 1
Sri asked on 01 May 2014, 03:56 PM
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?

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 02 May 2014, 09:55 AM
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");
radPropertyGrid1.FilterDescriptors.Add(filter);

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

I hope this helps.

Regards,
Peter
Telerik
 
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.
 
Tags
PropertyGrid
Asked by
Sri
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or