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

define a Combo box base on a list in PropertyGrid

1 Answer 61 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Naseem
Top achievements
Rank 1
Naseem asked on 28 Oct 2013, 02:29 AM
Hello,

In Property Grid , in case type of a property is defined as Enum , a combo box (with enum items) will be shown. Is there any way that instead of enum , a list can be used?
I know by defining data template I can achieve that , but I'm looking for a way that a list of values in combo box populate automatically. The same as what is happening for enum.

Kind Regards,
Naseem

1 Answer, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 31 Oct 2013, 11:44 AM
Hello Naseem,

RadPropertyGrid automatically generates RadComboBox as an editor for PropertyDefinition bound to Enum property. When you have FlagEnums, RadPropertyGrid generates FlagEnumEditor, not a ComboBox. When RadPropertyGrid is filled with a collection it generates CollectionEditor. You can find more information about it in this help article

I would advise you to use a DataTemplateSelector to achieve this. Please refer to this help article. In this way you will be free to load different DataTemplates according to your custom conditions. Please, let us know in case you need any additional help on this.

Regards,
Yoan
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
PropertyGrid
Asked by
Naseem
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Share this question
or