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

RadComboBox.Focus

1 Answer 148 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Judy
Top achievements
Rank 1
Judy asked on 16 Dec 2008, 05:40 PM
It seems no matter what I do, the RadCombBox will not receive focus with the following line of code (even when AllowShowFocusCues=True):

RadComboBox.Focus

It will however receive focus if I insert the following ridiculous line of code after the Focus:
RadComboBox.Focus

System.Windows.Forms.SendKeys.Send(

"{TAB}")

Am I missing something about the focus event on this control?  I should never have to use the SendKeys.

 

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 18 Dec 2008, 04:21 PM
Hello Judy,

Thank you for the question.

You are correct. If you call RadComboBox.Focus() in Form_Shown or at a later moment of the application cycle, you should be able to focus the textbox portion of the RadComboBox. However, currently we have an issue with this behavior. It will be addressed in one of our next versions.

For the time being, in Q3 2008 SP1 it is enough to call RadComboBox.Select() which will focus the textbox portion.

However, if you are using an older version of RadControls, please consider using the following code snippet:
this.radComboBox1.ComboBoxElement.TextBoxElement.TextBoxItem.Focus(); 

If you have additional questions, feel free to contact me.

Kind regards,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Asked by
Judy
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or