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

RadTabControl : TabItem change using Arrow key

3 Answers 103 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Jay
Top achievements
Rank 1
Jay asked on 17 Feb 2010, 01:18 PM
Hi Friends,

I have problem with RadTabControl, Its changing tab after text containt reach to top or bottom row using up or down key automatically. is there any way to switch off this functionality?



Thanks & Regards
Jaysukh

3 Answers, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 17 Feb 2010, 03:33 PM
Hi Jay,

I am not sure that I fully understand what is the issue you are experiencing. If you want to disable the navigation between tab items using the arrow keys, then the fastest way is to inherit RadTabItem and override its OnKeyDown method:

public class MyTabItem : RadTabItem
{
    protected override void OnKeyDown(KeyEventArgs e)
    {
    }
}

Then you can use it just like a regular RadTabItem:

<UserControl x:Class="SilverlightApplication1.MainPage"
        xmlns:local="clr-namespace:SilverlightApplication1"
        xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation">
    <Grid x:Name="LayoutRoot">
        <telerikNavigation:RadTabControl>
            <local:MyTabItem Header="Item 0" />
            <local:MyTabItem Header="Item 1" />
            <local:MyTabItem Header="Item 2" />
            <local:MyTabItem Header="Item 3" />
            <local:MyTabItem Header="Item 4" />
        </telerikNavigation:RadTabControl>
    </Grid>
</UserControl>

If you didn't have this in mind, could you please elaborate a little bit more on what the problem is. I'd be glad to further assist you.

Best wishes,
Kiril Stanoev
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.
0
Jay
Top achievements
Rank 1
answered on 18 Feb 2010, 05:12 AM
Hi Kiril

Please see below code , when I press two times down arrow key on textbox1 it will change selection of tabitem means item2 will be activate.
In case of my textbox is multiline I want to check inserted data using down key it will change selection of tabitem.

<
telerikNavigation:RadTabControl x:Name="tabControl" TabOrientation="Horizontal" TabStripPlacement="Left" >

 

 

 

<telerikNavigation:RadTabItem x:Name="item1" Header="Item1" >

 

 

 

<Grid>

 

 

 

<TextBox x:Name="textbox1" Width="200" Height="25" HorizontalAlignment="Left" VerticalAlignment="Top" ></TextBox>

 

 

 

<TextBox x:Name="textbox2" Width="200" Height="25" Margin="0,30,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" ></TextBox>

 

 

 

</Grid>

 

 

 

</telerikNavigation:RadTabItem>

 

 

 

<telerikNavigation:RadTabItem x:Name="Item2" Header="Item2" />

 

 

 

<telerikNavigation:RadTabItem x:Name="Item3" Header="Item3" />

 

 

 

</telerikNavigation:RadTabControl>

 

 

 

 

 

 

 

 
Thanks & Regards
Jay

 

0
Kiril Stanoev
Telerik team
answered on 18 Feb 2010, 10:05 AM
Hello Jay,

Unfortunately I am not able to reproduce the issue. Which version of our controls are you using? The attached sample project works with version 13.14 of our controls. Give it a try and let me know if you manage to reproduce the issue. I'd be glad to further assist you.

Sincerely yours,
Kiril Stanoev
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
Jay
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Jay
Top achievements
Rank 1
Share this question
or