ToggleButton - Client-side Events

Event log

Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB

RadToggleButton provides the following client-side events:

  • OnClientLoad - raised when the button is loaded.
  • OnClientClicking - raised when the user clicks the button. The event can be canceled.
  • OnClientClicked - raised when the button has been clicked. The event is subsequent to the OnClientClicking event.
  • OnClientMouseOver - raised when the mouse pointer is positioned over the button.
  • OnClientMouseOut - raised when the mouse pointer leaves the button.
  • OnClientToggleStateChanging - raised when the user changes the toggle state. The event can be canceled.
  • OnClientToggleStateChanged - raised when the user changes the toggle state. The event is subsequent to the OnClientToggleStateChanging event.
  • DefaultCS.aspx
  • scripts.js
  • styles.css
<%@ Page Language="C#" AutoEventWireup="true"  %>

<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <script src="scripts.js" type="text/javascript"></script>
    <link href="styles.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div class="demo-container size-thin" style="text-align: center">
        <telerik:RadToggleButton ID="RadToggleButton1" runat="server" Width="100px"
            AutoPostBack="false"
            OnClientLoad="telerikDemo.OnClientLoad"
            OnClientClicking="telerikDemo.OnClientClicking"
            OnClientClicked="telerikDemo.OnClientClicked"
            OnClientMouseOver="telerikDemo.OnClientMouseOver"
            OnClientMouseOut="telerikDemo.OnClientMouseOut"
            OnClientToggleStateChanging="telerikDemo.OnClientToggleStateChanging"
            OnClientToggleStateChanged="telerikDemo.OnClientToggleStateChanged">
            <ToggleStates>
                <telerik:ButtonToggleState Text="Mute" Icon-CssClass="mute-icon"></telerik:ButtonToggleState>
                <telerik:ButtonToggleState Text="Low" Icon-CssClass="low-icon"></telerik:ButtonToggleState>
                <telerik:ButtonToggleState Text="High" Icon-CssClass="high-icon"></telerik:ButtonToggleState>
            </ToggleStates>
        </telerik:RadToggleButton>
    </div>
    <qsf:EventLogConsole ID="EventLogConsole" runat="server" AllowClear="true"></qsf:EventLogConsole>
    </form>
</body>
</html>

Find Assistance

Help Us Improve

Was this example helpful?