New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial
SelectedTabChange
The server-side SelectedTabChange event occurs when non-selected tab is clicked, causing a postback.
The event handler function receives two arguments:
-
The RadRibbonBar which has fired the event. This argument is of type object, but can be cast to the RadRibbonBar type.
-
An EventArgs object has the following properties:
-
Tab - the currently selected tab.
-
PreviouslySelectedTab - the previously selected tab.
-
The following example demonstrates how to use the SelectedTabChange event to determine the new and the previously selected tab.
C#
protected void RadRibbonBar1_SelectedTabChange(object sender, RibbonBarSelectedTabChangeEventArgs e)
{
string message = string.Format("Tab {0} was selected.", e.Tab.Text);
string details = string.Format("Previosly selected tab was: {0}", e.PreviouslySelectedTab.Text);
textBox1.Text = string.Format("{0} {1}", message, details);
}