Button - Client-side Events

CheckBox Button
ToggleButton: Mute

Event log

Isolate this demo as a stand-alone application

RadButton exposes many client-side events that allow easy and flexible use in a wide range of application scenarios:

  • OnClientLoad —raised when the control is initialized.
  • OnClientClicking —raised when the user clicks the button. The event can be canceled.
  • OnClientClicked —raised when the button is clicked. The event is subsequent to the OnClientClicking event.
  • OnClientMouseOver —raised when the mouse hovers over the control.
  • OnClientMouseOut —raised when the mouse leaves the control.
  • OnClientCheckedChanging —raised when the Checked property of the RadButton control is about to be changed. The event can be canceled. 
  • OnClientCheckedChanged—raised after the Checked property of the RadButton control is changed.
  • OnClientToggleStateChanging—raised the SelectedToggleStateIndex property of the RadButton control is about to be changed. The event can be canceled.
  • OnClientToggleStateChanged—raised after the SelectedToggleStateIndex property of the RadButton control is changed.
<%@ 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>
    <link href="styles.css" rel="stylesheet" />
    <script src="scripts.js" type="text/javascript"></script>
</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">
        <div class="inner-btn-container">
            <telerik:RadButton ID="btnStandard" runat="server" Text="Standard Button" OnClientLoad="telerikDemo.OnClientLoad"
                OnClientClicking="telerikDemo.OnClientClicking" OnClientClicked="telerikDemo.OnClientClicked" OnClientMouseOver="telerikDemo.OnClientMouseOver"
                OnClientMouseOut="telerikDemo.OnClientMouseOut">
            </telerik:RadButton>
        </div>
        <div class="inner-btn-container">
            <telerik:RadButton ID="btnCheckBox" runat="server" ButtonType="ToggleButton" ToggleType="CheckBox"
                Text="CheckBox Button" OnClientLoad="telerikDemo.OnClientLoad" OnClientClicking="telerikDemo.OnClientClicking"
                OnClientClicked="telerikDemo.OnClientClicked" OnClientMouseOver="telerikDemo.OnClientMouseOver" OnClientMouseOut="telerikDemo.OnClientMouseOut"
                OnClientCheckedChanging="telerikDemo.OnClientCheckedChanging" OnClientCheckedChanged="telerikDemo.OnClientCheckedChanged">
            </telerik:RadButton>
        </div>
        <div class="inner-btn-container">
            <telerik:RadButton ID="RadButton1" runat="server" ButtonType="LinkButton" ToggleType="CustomToggle"
                Text="CustomToggle Button" OnClientLoad="telerikDemo.OnClientLoad" OnClientClicking="telerikDemo.OnClientClicking"
                OnClientClicked="telerikDemo.OnClientClicked" OnClientMouseOver="telerikDemo.OnClientMouseOver" OnClientMouseOut="telerikDemo.OnClientMouseOut"
                OnClientToggleStateChanging="telerikDemo.OnClientToggleStateChanging" OnClientToggleStateChanged="telerikDemo.OnClientToggleStateChanged">
                <ToggleStates>
                    <telerik:RadButtonToggleState Text="ToggleButton: Mute"></telerik:RadButtonToggleState>
                    <telerik:RadButtonToggleState Text="ToggleButton: Low"></telerik:RadButtonToggleState>
                    <telerik:RadButtonToggleState Text="ToggleButton: Medium"></telerik:RadButtonToggleState>
                    <telerik:RadButtonToggleState Text="ToggleButton: High"></telerik:RadButtonToggleState>
                </ToggleStates>
            </telerik:RadButton>
        </div>
    </div>
    <qsf:EventLogConsole ID="EventLogConsole1" runat="server" AllowClear="true" Height="300px"></qsf:EventLogConsole>
    </form>
</body>
</html>

Find Assistance

Help Us Improve

Was this example helpful?