RadComboBox Highlights Text

2 posts, 0 answers
  1. Tim
    Tim avatar
    27 posts
    Member since:
    Jul 2006

    Posted 01 Jul 2008 Link to this post

    How do you turn off AutoHighlighting for a RadComboBox.  When the user selects an item in the dropdown, the text is highlighted in the control.  Is there any way not to highlight the text???
  2. Georgi
    Georgi avatar
    212 posts

    Posted 03 Jul 2008 Link to this post

    Hi Leonard,

    This is the default behavior of the RadComboBox which you can workaround through the code. You can use the DropDownClosed and KeyUp events in which handlers set SelectionLength property to 0. The first event handles the case when the user is selecting an item from the drop-down window while the second handles the case when the user selects items by Up/Down keys. Here is a sample code:

        private void radComboBox1_DropDownClosed(object sender, RadPopupClosedEventArgs args)  
            this.radComboBox1.SelectionLength = 0;  
        private void radComboBox1_KeyUp(object sender, KeyEventArgs e)  
            if (e.KeyCode == Keys.Up || e.KeyCode == Keys.Down)  
                this.radComboBox1.SelectionLength = 0;  

    We are planning a change in the selection behavior for RadComboBox, but I cannot give you an exact date when it will be released.


    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. DevCraft R3 2016 release webinar banner
Back to Top