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

Combobox steals focus and switches tabs

3 Answers 172 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
jen
Top achievements
Rank 1
jen asked on 03 Jan 2017, 05:14 PM
version 2016.3.1024.45

 

I have two tabs with a radcombobox on each tab. Sometimes clicking on one radcombobox is changing my tab selection and putting focus on the other radcombobox. This only occurs with radcomboboxes, not with regular comboboxes.

 

Steps
- the radcombobox 1 on tab 1 is selected and focused (not sure the exact state, its difficult to reproduce)
- the user switches to tab 2 and clicks on the radcombobox 2 
- the combobox 1 grabs the focus and the tab switches back to tab 1

and vice versa

 

Why does the combobox on the inactive tab grab the focus back?
Does the radcombobox not know when it is on not active tab?

How can I prevent the radcomboboxes from changing my tab selection?

 

3 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 06 Jan 2017, 11:10 AM
Hi Jen,

We have tried to reproduce the issue on our side using the provided by you description and steps, but with no success - it seems everything is working as expected. That is why we would like to ask you for more information about your scenario. Are you using the native WPF TabControl or RadTabControl to place the ComboBoxes inside their tabs? Do you have nested TabControls? Sharing the XAML of your view will also be of great help.

Attached you could find the project we used for our investigation following the provided steps.

Could you please modify the project  in order to reproduce the issue - that will help us to better understand your scenario and provide you with the best possible solution?

We are looking forward to hearing from you.

Regards,
Nasko
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
jen
Top achievements
Rank 1
answered on 06 Jan 2017, 02:52 PM
Thanks for the project. I have determined you can reproduce the issue if you use the native tab control and place the radComboboxes into radToolBars.

 

        <TabControl >
            <TabItem Header="Tab 1">
                <telerik:RadToolBar  VerticalAlignment="Top">
                    <Label Content="tab one" Margin="3"/>
                    <telerik:RadComboBox Width="125"  Margin="3"
                                     DataContext="{StaticResource MyViewModel}"
                                     ItemsSource="{Binding Cars}"
                                     DisplayMemberPath="Make" />
                </telerik:RadToolBar>
            </TabItem>
            <TabItem Header="Tab 2">
                <telerik:RadToolBar  VerticalAlignment="Top">
                    <Label Content="tab two" Margin="3"/>
                    <telerik:RadComboBox Width="125"  Margin="3" 
                                     DataContext="{StaticResource MyViewModel}"
                                     ItemsSource="{Binding Cars}"
                                     DisplayMemberPath="Make" />
                </telerik:RadToolBar>
            </TabItem>
        </TabControl>

0
Nasko
Telerik team
answered on 09 Jan 2017, 08:34 AM
Hello Jen,

Thank you for the provided code-snippet. We were able to reproduce the described by you issue. However, we could not tell for sure if RadComboBox is causing it as it could be reproduced with other controls as well (like RadDropDownButton). We suggest you to consider using RadTabControl instead of the native TabControl - it provides additional features and does not cause the observed issue (as it could not be reproduced in RadTabControl, also we consider the issue might be caused by the native TabControl).

If RadTabControl does not work for you, please let us know and we will try to provide you with another solution.

Hope this helps.

Regards,
Nasko
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
ComboBox
Asked by
jen
Top achievements
Rank 1
Answers by
Nasko
Telerik team
jen
Top achievements
Rank 1
Share this question
or