DropDownListEditor ComboBox Mode

2 posts, 0 answers
  1. Chris Gethin
    Chris Gethin avatar
    4 posts
    Member since:
    Mar 2010

    Posted 27 May 2012 Link to this post

    Is it possible to set a DropDownListEditor in a PropertyGrid to behave like a ComboBox?

    I have tried setting the DropDownStyle property to RadDropDownStyle.DropDown, which looks as though this should setup this behaviour, but it does not seem to work. It is not possible to enter text even when this has been set.

    Is there an additional step that needs to be taken in order for the dropdown list to allow text entry?


  2. Ivan Petrov
    Ivan Petrov avatar
    701 posts

    Posted 30 May 2012 Link to this post

    Hi Chris,

    Thank you for writing.

    You can use the EditorInitialized event to change the drop down editor behavior. Here is a code snippet which demonstrates this:
    private void radPropertyGrid1_EditorInitialized(object sender, PropertyGridItemEditorInitializedEventArgs e)
      if (e.Editor is PropertyGridDropDownListEditor)
        PropertyGridDropDownListEditor editor = e.Editor as PropertyGridDropDownListEditor;
        BaseDropDownListEditorElement element = editor.EditorElement as BaseDropDownListEditorElement;
        element.DropDownStyle = RadDropDownStyle.DropDown;            

    I hope this will be useful. Should you need further assistance, I would be glad to help.
    Ivan Petrov
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Back to Top