New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Client-side Events

Event log

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.
  • 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>
<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 RenderMode="Lightweight" 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 RenderMode="Lightweight" 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 RenderMode="Lightweight" 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>

Support & Learning Resources

Find Assistance