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

ToggleButton Object

The following table lists the most important members of the client-side RadToggleButton object:

Public Properties

NameDescription
get_enabledReturns a value indicating whether the button control is enabled.
set_enabledSets whether the button is enabled.
get_textThe text displayed in the RadToggleButton control.
set_textSets the text displayed in the RadToggleButton control.
get_toolTipGets the text displayed when the mouse pointer hovers over the RadToggleButton control.
set_toolTipSets the text displayed when the mouse pointer hovers over the RadToggleButton control.
get_uniqueIDGets the unique, hierarchically qualified identifier for the RadToggleButton control.
get_iconElementGets a reference to the HTML element that holds the icon.
get_textElementGets a reference to the HTML element that holds the text of the RadToggleButton control.
get_cssClassGets the Cascading Style Sheet (CSS) class rendered by the RadToggleButton control on the client.
get_disabledCssClassGets the CSS class applied when the control is disabled.
get_hoveredCssClassGets the CSS class applied to the RadToggleButton control when the mouse pointer is over the control.
get_pressedCssClassGets the CSS class applied to the RadToggleButton control when the control is pressed.
get_commandNameGets the command name associated with the RadToggleButton control that is passed to the Command event.
set_commandNameSets the command name associated with the RadToggleButton control that is passed to the Command event.
get_commandArgumentGets an optional parameter passed to the Command event along with the associated CommandName.
set_commandArgumentSets an optional parameter passed to the Command event along with the associated CommandName.
get_autoPostBackGets a bool value indicating whether the RadToggleButton control automatically posts back to the server when clicked.
set_autoPostBackSets or sets a bool value indicating whether the RadToggleButton control automatically posts back to the server when clicked.
get_heightGets the height of the RadToggleButton control.
get_widthGets the width of the RadToggleButton control.
IsInputTypeSubmitGets a bool value indicating whether the button is a submit button.
get_singleClickGets a bool value indicating whether the RadToggleButton control will be immediately disabled after the user has clicked it (i.e., enables/disables "Single Click" functionality).
get_singleClickTextGets the text displayed in the RadToggleButton control after the button is clicked and disabled (i.e. the text used for the 'Single Click' functionality).
enableAfterSingleClickEnables the button and restores the button's text, after it has been disabled by a single click.
get_visibleGets a bool value indicating whether the button is visible.
set_visibleShows/hides the button.
get_validationGroupGets the name of the ValidationGroup to which RadToggleButton is assigned.
set_validationGroupSets the ValidationGroup to which RadToggleButton should be assigned.
get_toggleStatesGets the collection of ButtonToggleState objects that belong to the RadToggleButton control.
set_toggleStatesSets the collection of ButtonToggleState objects that belong to the RadToggleButton control.
get_selectedToggleStateGets the currently selected ToggleState of the RadToggleButton control.
set_selectedToggleStateSets the currently selected ToggleState of the RadToggleButton control.
get_selectedToggleStateIndexGets the index of the currently selected ToggleState of the RadToggleButton control.
set_selectedToggleStateIndexSets the index of the currently selected ToggleState of the RadToggleButton control.

Public Methods

NameDescription
focusBrings the focus to the RadToggleButton control.
clickExecutes a programmatic button click. Accepts an optional boolean parameter that specifies whether the client-side clicking event of RadToggleButton will be fired when the control is clicked programmatically. If the function is called without parameter, the clicking event will not be fired.

Public Properties of RadButtonToggleState object.

PropertiesDescription
get_index()Gets the 0-based index of the ToggleState object in the ToggleStates collection.
get_text()Gets the text displayed in the ButtonToggleState control.
get_cssClass()Gets the CSS class applied to the ButtonToggleState object.
get_hoveredCssClass()Gets the CSS class applied to the ButtonToggleState object when the mouse pointer is over the control.
get_pressedCssClass()Gets the CSS class applied to the ButtonToggleState object when the control is pressed.
get_height()Gets the height of the ButtonToggleState object.
get_width()Gets the width of the ButtonToggleState object.
get_primaryIconCssClass()Gets the CSS class applied to the Icon.
get_primaryIconUrl()Gets the URL to the image used as the Icon.
get_primaryHoveredIconUrl()Gets the URL to the image showed when the ButtonToggleState is hovered.
get_primaryPressedIconUrl()Gets the URL to the image showed when the ButtonToggleState is pressed.
get_primaryIconHeight()Gets the height of the Icon.
get_primaryIconWidth()Gets the width of the Icon.
get_primaryIconTop()Gets the top edge of the Icon, relative to the ButtonToggleState object's wrapper element.
get_primaryIconLeft()Gets the left edge of the Icon, relative to the ButtonToggleState object's wrapper element.
get_imageUrl()Gets the location of an image to display in the ButtonToggleState object.
get_hoveredImageUrl()Gets the location of an image to display in the ButtonToggleState object, when the mouse pointer is over the control.
get_pressedImageUrl()Gets the location of an image to display in the ButtonToggleState object, when the control is pressed.

Methods for modifying client-side event handlers dynamically

NameDescription
add_loadThe name of the JavaScript function called when the control loads.
remove_loadRemoves a handler for the load event.
add_clickingThe name of the JavaScript function called when the RadToggleButton control is clicked.
remove_clickingRemoves a handler for the clicking event.
add_toggleStateChangingThe name of the JavaScript function called before the state of the ToggleButton is changed.
remove_toggleStateChangingRemoves a handler for the toggleStateChanging event.
add_toggleStateChangedThe name of the JavaScript function called when the state of the ToggleButton is changed.
remove_toggleStateChangedRemoves a handler for the toggleStateChanged event.
add_clickedThe name of the JavaScript function called when the RadToggleButton control is clicked.
remove_clickedRemoves a handler for the clicked event.
add_mouseOverThe name of the JavaScript function called when the mouse hovers over the control.
remove_mouseOverRemoves a handler for the mouseOver event.
add_mouseOutThe name of the JavaScript function when the mouse leaves the control.
remove_mouseOutRemoves a handler for the mouseOut event.

You can read more on the subject in the Setting Client Event Handlers by Using JavaScript help article.

See Also

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