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

When TabItem loses focus, all controls on TabItem GET focus

1 Answer 100 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
C Bates
Top achievements
Rank 1
C Bates asked on 09 Feb 2010, 09:10 PM
Hello,
I have put together a simple app to demonstrate the problem.  I have a RadTabItem with several TextBox controls on it.
If I:
- click in a TextBox
- click on another tab header in the same group
All the TextBox controls on the first TabItem receive a "GotFocus" event.
Very undesirable, since every time certain controls in our real application gets focus it initiates a round-trip to the server.
The xaml:
        <dock:RadDocking x:Name="docking" Grid.Row="1"
            <dock:RadDocking.DocumentHost> 
                <dock:RadSplitContainer x:Name="mapContainer1"
                    <dock:RadPaneGroup x:Name="leftGroup" GotFocus="Group_GotFocus"
                        <dock:RadPane x:Name="leftPane" GotFocus="Pane_GotFocus"
                            <tab:RadTabControl x:Name="leftTabControl"  GotFocus="TabControl_GotFocus" > 
                                <tab:RadTabItem Header="tab1" GotFocus="RadTabItem_GotFocus"
                                    <StackPanel> 
                                        <TextBox x:Name="tb1" Text="tb1"  GotFocus="TextBox_GotFocus" /> 
                                        <TextBox x:Name="tb2" Text="tb2" GotFocus="TextBox_GotFocus" /> 
                                        <TextBox x:Name="tb3" Text="tb3"  GotFocus="TextBox_GotFocus" /> 
                                        <TextBox x:Name="tb4" Text="tb4" GotFocus="TextBox_GotFocus" /> 
                                        <TextBox x:Name="tb5" Text="tb5" GotFocus="TextBox_GotFocus" /> 
                                        <TextBox x:Name="tb6" Text="tb6" GotFocus="TextBox_GotFocus" /> 
                                    </StackPanel> 
                                </tab:RadTabItem> 
                                <tab:RadTabItem Header="tab2" GotFocus="RadTabItem_GotFocus"
                                    <StackPanel> 
                                        <TextBox x:Name="tb7" Text="tb7" GotFocus="TextBox_GotFocus" /> 
                                        <TextBox x:Name="tb8" Text="tb8" GotFocus="TextBox_GotFocus" /> 
                                        <TextBox x:Name="tb9" Text="tb9" GotFocus="TextBox_GotFocus" /> 
                                    </StackPanel> 
                                </tab:RadTabItem> 
                            </tab:RadTabControl> 
                        </dock:RadPane> 
                    </dock:RadPaneGroup> 
                </dock:RadSplitContainer> 
            </dock:RadDocking.DocumentHost>   
        </dock:RadDocking> 
 
Is this a bug?  Is there a work-around?
Thanks.
(In the screenshot, I started the app, clicked on tb1, then clicked on tab2.  tb1 - tb6 received GotFocus events.)

Update:  If I click on tb1, then click on tab1 (does nothing, since tab1 is already the selected tab), then click on tab2, tb1 - tb6  _don't_ get all the GotFocus events.  Weird.

1 Answer, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 14 Feb 2010, 09:58 PM
Hi Bates,

Thank you for reporting the issue.

We confirm the observable effect - it is related to the tab-page that is becoming invisible.

According your report we updated your Telerik points.

Best wishes,
Ivan
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
TabControl
Asked by
C Bates
Top achievements
Rank 1
Answers by
Ivan
Telerik team
Share this question
or