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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to use the Tab key to change tabs in the tabstrip control?

Platform: ASP.NET Web Forms (Classic) |
Control: TabStrip |
Published Date: April 30, 2011 |
Last Revised Date: July 10, 2014

 

You can access the key events through client side and can achieve this behavior. For doing this we have to get the keyCode from the keydown event of TabStrip then we have to check if the key is "Tab" then we have to call the CallbackRefresh event, in which the next TabStrip has to be selected.

C#

function test()

{

var keycode=window.event.keyCode;

if(keycode == 9)

{

CallbackPanel1.callback("argument");

}

}

protected void CallbackPanel1_CallbackRefresh(object sender, Syncfusion.Web.UI.WebControls.Tools.CancellableCallbackEventArgs e)

{

if (this.TabStrip1.Items[0].Selected)

{

this.TabStrip1.Items[1].Selected = true;

this.TabStrip1.Items[0].Selected = false;

this.TabStrip1.Items[2].Selected = false;

}

else if (this.TabStrip1.Items[1].Selected)

{

this.TabStrip1.Items[2].Selected = true;

this.TabStrip1.Items[0].Selected = false;

this.TabStrip1.Items[1].Selected = false;

}

else if (this.TabStrip1.Items[2].Selected)

{

this.TabStrip1.Items[0].Selected = true;

this.TabStrip1.Items[1].Selected = false;

this.TabStrip1.Items[2].Selected = false;

}

}

VB

Private Function test() As function

Dim keycode As var=window.event.keyCode

If keycode = 9 Then

CallbackPanel1.callback("argument")

End If

End Function

Protected Sub CallbackPanel1_CallbackRefresh(ByVal sender As Object, ByVal e As Syncfusion.Web.UI.WebControls.Tools.CancellableCallbackEventArgs)

If Me.TabStrip1.Items(0).Selected Then

Me.TabStrip1.Items(1).Selected = True

Me.TabStrip1.Items(0).Selected = False

Me.TabStrip1.Items(2).Selected = False

Else If Me.TabStrip1.Items(1).Selected Then

Me.TabStrip1.Items(2).Selected = True

Me.TabStrip1.Items(0).Selected = False

Me.TabStrip1.Items(1).Selected = False

Else If Me.TabStrip1.Items(2).Selected Then

Me.TabStrip1.Items(0).Selected = True

Me.TabStrip1.Items(1).Selected = False

Me.TabStrip1.Items(2).Selected = False

End If

End Sub

Sample:

http://help.syncfusion.com/support/samples/KB/Tools.Web/5.2.0.25/Tabs/tabstrip.zip

ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon