KaxTabSelectedIndex Property |
Gets or sets the index of the selected child tab.
Namespace: Kettic.AspNet.ControlsAssembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntax public int SelectedIndex { get; set; }
Public Property SelectedIndex As Integer
Get
Set
public:
virtual property int SelectedIndex {
int get () sealed;
void set (int value) sealed;
}
abstract SelectedIndex : int with get, set
override SelectedIndex : int with get, set
Property Value
Type:
Int32
The zero based index of the selected tab. The default value is -1 (no child tab is selected).
Implements
IKaxTabContainerSelectedIndexRemarks
Use the SelectedIndex property to programmatically specify the selected
child tab in a IKaxTabContainer (KaxTabControl or KaxTab).
To clear the selection set the SelectedIndex property to -1.
Examples
The following example demonstrates how to programmatically select a tab by using
the
SelectedIndex property.
void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
KaxTab newsTab = new KaxTab("News");
KaxTabControl1.Tabs.Add(newsTab);
KaxTabControl1.SelectedIndex = 0;
KaxTab cnnTab = new KaxTab("CNN");
newsTab.Tabs.Add(cnnTab);
KaxTab nbcTab = new KaxTab("NBC");
newsTab.Tabs.Add(nbcTab);
newsTab.SelectedIndex = 1;
}
}
Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
Dim newsTab As KaxTab = New KaxTab("News")
KaxTabControl1.Tabs.Add(newsTab)
KaxTabControl1.SelectedIndex = 0
Dim cnnTab As KaxTab = New KaxTab("CNN")
newsTab.Tabs.Add(cnnTab)
Dim nbcTab As KaxTab = New KaxTab("NBC")
newsTab.Tabs.Add(nbcTab)
newsTab.SelectedIndex = 1
End If
End Sub
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also