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

Properties and Events

This help article lists the server-side API for RadToggleButton including its toggle states, the corresponding icon and image tags and events.

RadToggleButton common features (properties)

PropertyDescription
AutoPostBackGets or sets a bool value indicating whether the control will automatically post the page back to the server.
CausesValidationGets or sets a bool value indicating whether validation is performed when the RadToggleButton is clicked.
PostbackUrlGets or sets the URL of the page to post to from the current page, when the RadToggleButton is clicked.
PrimaryGets or sets a bool value indicating whether the button uses its primary appearance.
TextGets or sets the text displayed in the RadToggleButton control.
ValidationGroupGets or sets the group of controls for which the RadToggleButton control causes validation when it posts back to the server.
CommandNameGets or sets the command name associated with the RadToggleButton control that is passed to the Command event.
CommandArgumentGets or sets an optional parameter passed to the Command event along with the associated CommandName.
CssClassDefines the CSS class for the RadToggleButton.
HoveredCssClassGets or sets the CSS class when the mouse pointer is hovered over the RadToggleButton control.
PressedCssClassGets or sets the CSS class when the RadToggleButton control is pressed.
OnClientLoadSets a name of a JavaScript function that will be called when the RadToggleButton is loaded on the page.
OnClientClickingSets a name of a JavaScript function that will be called when the RadToggleButton is clicked. The event is cancelable.
OnClientClickedSets a name of a JavaScript function that will be called when the RadToggleButton is clicked, after the OnClientClicking event.
OnClientMouseOverSets a name of a JavaScript function that will be called when the mouse pointer hovers over the RadToggleButton.
OnClientMouseOutSets a name of a JavaScript function that will be called when the mouse pointer leaves the RadToggleButton.
OnClientToggleStateChangingSets a name of a JavaScript function that will be called prior to the RadToggleButton state change. The event is cancelable.
OnClientToggleStateChangedSets a name of a JavaScript function that will be called when the RadToggleButton state is changed, after the OnClientToggleStateChanging event.
UseSubmitBehaviorGets or sets a bool value indicating whether the RadToggleButton control uses the client browser's submit mechanism or the ASP.NET postback mechanism.
ValueValue associated with the button.
WidthSets the width of the button.
HeightGet/Set the height of the button.
SelectedToggleSateGets or sets the current state of the button.
SelectedToggleSateIndexGets or sets the index of the currently selected ToggleState of the Button control, when used as a custom toggle button.
ToggleSatesCollection of type ButtonToggleState.

ButtonToggleState specific features (properties)

PropertyDescription
TextGets or sets the text displayed in the ButtonToggleState.
ValueValue associated with the button.
SelectedGets or sets a bool value indicating whether the ToggleState is selected or not.
CssClassDefines the CSS class for the ButtonToggleState.
HoveredCssClassGets or sets the CSS class when the mouse pointer is hovered over the ButtonToggleState control.
PressedCssClassGets or sets the CSS class when the ButtonToggleState control is pressed.
WidthSets the width of the ButtonToggleState.
HeightGet/Set the height of the ButtonToggleState.
CommandNameGets or sets the command name associated with the RadToggleButton control that is passed to the Command event.
CommandArgumentGets or sets an optional parameter passed to the Command event along with the associated CommandName.

Icon specific features (properties)

PropertyDescription
UrlGets or sets the URL to the image used as an icon.
HoveredUrlGets or sets the URL to the image showed when the icon is hovered.
PressedUrlGets or sets the URL to the image showed when the icon is pressed.
HeightGets or sets the height of the icon.
WidthGets or sets the width of the icon.
CssClassGets or sets the CSS class applied to the icon.
HoveredCssClassGets or sets the CSS class applied to the RadToggleButton control when the mouse pointer is over the control.
PressedCssClassDefines the CSS class of the icon element, when the RadToggleButton is pressed.
TopGets or sets the top edge of the icon, relative to the RadToggleButton control's wrapper element.
LeftGets or sets the left edge of the icon, relative to the RadToggleButton control's wrapper element.

Image specific features (properties)

PropertyDescription
UrlSpecifies the path to the image.
DisabledUrlSpecifies the path to the image when the button is disabled.
HoveredUrlSpecifies the path to the image when the mouse is over the RadToggleButton.
PressedUrlSpecifies the path to the image of a pressed RadToggleButton.
SizingSpecifies the way the image is sized in the RadToggleButton. Available values are: Original and Stretch.

Server-side Events:

PropertyDescription
OnClickRaised when the RadToggleButton performs a postback.
OnCommandRaised when the RadToggleButton performs a postback.
OnToggleStateChangedRaised when the state of the RadToggleButton has changed.

The event order is:

  1. OnToggleStateChanged

  2. OnClick

  3. OnCommand