New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

ToggleListToggle

The server-side ToggleListToggle event occurs when a ToggleButton inside a ToggleList is toggled, causing a postback.

The event handler function receives two arguments:

  1. The RadRibbonBar which has fired the event. This argument is of type object, but can be cast to the RadRibbonBar type.

  2. An EventArgs object with the following properties:

    • ToggleButton - the ToggleButton that has been toggled.

    • ToggleList - the parent toggle list of the clicked toggle button.

    • ToggleListButtons - a collection of all toggle button in the parent toggle list.

    • Group - the parent group of the clicked toggle button.

    • Index - the index of the clicked toggle button in its containing toggle list.

The following example shows how to use the properties of the event arguments:

C#
	
protected void RadRibbonBar1_ToggleListToggle(object sender, RibbonBarToggleListToggleEventArgs e)
{
    string message = string.Format("ToggleList's ToggleButton {0} was toggled.", e.ToggleButton.Text);
    string details = string.Format("Group: {0}, Index: {1}", e.Group.Text, e.Index);

    textBox1.Text = string.Format("{0} {1}", message, details);
}
	

See Also

In this article
See Also
Not finding the help you need?
Contact Support