How to add Tab key as select value

2 posts, 1 answers
  1. Charles
    Charles avatar
    9 posts
    Member since:
    Jun 2012

    Posted 27 Jun 2011 Link to this post

    When I type something such as "abb",   the "ABB Allentown" value is selected.
    After that, the user press Enter key that value chosen.
    I want to the TAB key work the same way.
    Pls provide the alternative solution to achieve this functionality.
  2. Answer
    Martin Vasilev
    Martin Vasilev avatar
    1061 posts

    Posted 30 Jun 2011 Link to this post

    Hello Bang,

    Actually, after some time spent on trying to find solution about your question, I have managed to discover one. You can create a custom MultiColumnComboBox control, which overrides ProcessCmdKey. In this event, if a tab press was detected - use ClosePopup method to close the drop down. Please consider the following code as example:
    public class CustomMultiColumnComboBox : RadMultiColumnComboBox
        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
            switch (keyData)
                case Keys.Tab:
            return base.ProcessCmdKey(ref msg, keyData);

    I hope this helps. Let me know if you have any additional questions. 

    All the best,
    Martin Vasilev
    the Telerik team
    Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
Back to Top