define a Combo box base on a list in PropertyGrid

2 posts, 0 answers
  1. Naseem
    Naseem avatar
    70 posts
    Member since:
    Nov 2010

    Posted 27 Oct 2013 Link to this post

    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
  2. Yoan
    Admin
    Yoan avatar
    1070 posts

    Posted 31 Oct 2013 Link to this post

    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 >>
  3. DevCraft banner
Back to Top