PropertyGridDropDownListEditor auto-open List?

2 posts, 1 answers
  1. VaL
    VaL avatar
    30 posts
    Member since:
    Oct 2017

    Posted 30 Sep 2019 Link to this post

    Hello,

    some of our users complains about the fact that they need to click twice to edit a value in a PropertyGridDropDownListEditor.

    The first click generate and start the editor, the second to open the list.

    Is there a way to automatically open the list after the editor has been initialized?

    Thanks!

  2. Answer
    Dimitar
    Admin
    Dimitar avatar
    2949 posts

    Posted 01 Oct 2019 Link to this post

    Hi Valerio,

    You can use the EditorInitialized event to show the popup. Here is the code:

    private void RadPropertyGrid1_EditorInitialized(object sender, PropertyGridItemEditorInitializedEventArgs e)
    {
        if (e.Editor is PropertyGridDropDownListEditor)
        {
            var editor = e.Editor as PropertyGridDropDownListEditor;
            var element = editor.EditorElement as BaseDropDownListEditorElement;
            if (!element.IsPopupOpen)
            {
                element.ShowPopup();
            }
        }
    }
    

    I hope this helps. Should you have any other questions, do not hesitate to ask.

    Regards,
    Dimitar
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top