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

Properties and Events

RadSwitch common features (properties)

PropertyDescription
AutoPostBackGets or sets a bool value indicating whether the control will automatically post the page back to the server. Default value is true.
CausesValidationGets or sets a bool value indicating whether validation is performed when the RadSwitch is clicked.
CheckedGets or sets a nullable bool value indicating whether the RadSwitch is checked. If a null value is set, the value will default to false.
CurrentToggleStateGets the On or Off toggle state based on the Checked property.
PostbackUrlGets or sets the URL of the page to post to from the current page, when the RadSwitch is clicked.
ValidationGroupGets or sets the group of controls for which the RadSwitch control causes validation when it posts back to the server.
CommandNameGets or sets the command name associated with the RadSwitch control that is passed to the Command event.
CommandArgumentGets or sets an optional parameter passed to the Command event along with the associated CommandName.
CssClassDefine the CSS class for the RadSwitch.
DisabledCssClassDefine the CSS class for the RadSwitch when it is disabled.
HoveredCssClassGets or sets the CSS class, when the mouse pointer is hovered over the RadSwitch control.
PressedCssClassGets or sets the CSS class, when the RadSwitch control is pressed.
OnClientLoadSets a name of a JavaScript function that will be called when the RadSwitch is loaded on the page
OnClientClickingSets a name of a JavaScript function that will be called when the RadSwitch is clicked. The event is cancelable.
OnClientClickedSets a name of a JavaScript function that will be called when the RadSwitch is clicked, after the OnClientClicking event.
OnClientCheckedChangingSets a name of a JavaScript function that will be called when the RadSwitch is checked/unchecked. The event is cancelable.
OnClientCheckedChangedSets a name of a JavaScript function that will be called when the RadSwitch is checked/unchecked, after the OnClientClicking event.
OnClientMouseOverSets a name of a JavaScript function that will be called when the mouse pointer hovers over the RadSwitch
OnClientMouseOutSets a name of a JavaScript function that will be called when the mouse pointer leaves the RadSwitch
UseSubmitBehaviorGets or sets a bool value indicating whether the RadSwitch control uses the client browser's submit mechanism or the ASP.NET postback mechanism.
ValueValue associated with the switch.

RadSwitch -> ToggleStates common features (properties)

PropertyDescription
ToggleStateOffConfigures the OFF/Unchecked toggle state settings.
ToggleStateOnConfigure the ON/Checked toggle state settings.

RadSwitch -> ToggleStates -> ToggleStateOff common features (properties)

PropertyDescription
TextGets or sets optional ToggleStateOff text.
ValueGets or sets optional ToggleStateOff value.

RadSwitch -> ToggleStates -> ToggleStateOn common features (properties)

PropertyDescription
TextGets or sets optional ToggleStateOn text.
ValueGets or sets optional ToggleStateOn value.

Server - side Events:

PropertyDescription
OnClickRaised when the RadSwitch performs a postback.
OnCommandRaised when the RadSwitch performs a postback.
OnCheckedChangedRaised when the checked state of the RadSwitch has changed.

The event order is:

  1. OnCheckedChanged

  2. OnClick

  3. OnCommand