We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Cannot set Focus

I program a wpf app and use a community license. I use several SfMultiColumnDropDownControl contols in one window. I'm trying to focus on a combo box like that, but it does not work. For example: comboBox.Focus () does not work. Can you help me?

3 Replies

MA Mohanram Anbukkarasu Syncfusion Team October 3, 2019 11:45 AM UTC

Hi Firat,   
Thanks for using Syncfusion products.   
We have checked the reported scenario about focusing the SfMultiColumnDropDown control and we are able to reproduce it in our end. You can move the focus to a specific SfMultiColumnDropDown control by moving the focus to its editor control as given in the below code example.   
Code example:    
var textBox = this.comboBox1.GetType().GetProperty("Editor", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetValue(this.comboBox1);   
if (textBox != null && textBox is TextBox)   
    (textBox as TextBox).Focus();   
We have prepared a sample using the above code example and it is available in the below link for your reference.   
Please let us know if your need further other assistance from us.   
Mohanram A  

FI Firat October 4, 2019 09:14 AM UTC

Many thanks for your help. It works without problems.

FP Farjana Parveen Ayubb Syncfusion Team October 7, 2019 05:38 AM UTC

Hi Firat 
Thanks for the update. 
We are glad to know that the reported problem has been resolved at your end. Please let us know if you have any further queries on this. We are happy to help you. 
Farjana Parveen A 

Live Chat Icon For mobile
Up arrow icon