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.
Unfortunately, activation email could not send to your email. Please try again.

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

 

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

Article ID: Published Date: Last Revised Date: Platform: Control:
1722 04/30/2011 07/10/2014 ASP.NET Web Forms (Classic) TabStrip
Tags:
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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.