This is a migrated thread and some comments may be shown as answers.

RadComboBox Highlights Text

1 Answer 102 Views
ComboBox and ListBox (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Tim
Top achievements
Rank 1
Tim asked on 01 Jul 2008, 03:28 PM
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???

1 Answer, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 03 Jul 2008, 09:15 AM
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.

Regards,

Georgi
the Telerik team


Instantly find answers to your questions at the new Telerik Support Center
Tags
ComboBox and ListBox (obsolete as of Q2 2010)
Asked by
Tim
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Share this question
or