RadCheckedDropDownList focusing popups?

2 posts, 0 answers
  1. Jeff
    Jeff avatar
    4 posts
    Member since:
    Jul 2015

    Posted 30 Mar Link to this post

    Hello ,

    I am trying to use a radCheckedDropDown list in a winforms application (C#).  The list is working the way I want it to except for 1 thing.

    When I click the dropdown list it shows (which is correct) however while it is open if I start to type in the text area the text popup shows in front of the dropdown popup, and as a result you can click through to the drop down list.  What I would like is to close the dropdown portion when typing, and vice versa when using the drop down list. 

    If I use a standard combobox I can accomplish this by  hooking the preview and the droppeddown events, however the radcheckeddropdownlist does not have the droppeddown event.

    private void comboBox_DropDown(object sender, EventArgs e)

    {

    ComboBox cbo = (ComboBox)sender; cbo.PreviewKeyDown += new PreviewKeyDownEventHandler(comboBox_PreviewKeyDown);  

    }

    private void comboBox_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)

    {

    ComboBox cbo = (ComboBox)sender;

    cbo.PreviewKeyDown -= comboBox_PreviewKeyDown;

    if (cbo.DroppedDown) cbo.Focus();

    }

     

    Thanks,

    Jeff

  2. Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 04 Apr Link to this post

    Hello Jeff,

    Thank you for writing.

    You can use the AutoCompleteTextBox TextChanged event and close the popup. You can subscribe the event like this:
    radCheckedDropDownList1.CheckedDropDownListElement.AutoCompleteEditableAreaElement.AutoCompleteTextBox.TextChanged+=TextBoxItem_TextChanged;

    If the autocomplete drop-down is shown and the drop-down button is clicked the items drop-down will be shown and the autocomplete drop-down will be automatically closed.

    Please do not hesitate to contact us with any additional questions or concerns. 
     
    Regards,
    Dimitar
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top