Edit this page

OnClientClicked

The clicked event is subsequent to the checkedChanged event, and occurs when the RadCheckBox control is clicked. The event is fired after the client-side validation is completed (just like the PushButon's OnClientClicked event), just before the page is submitted, and cannot be canceled.

The event handler receives two parameters:

  1. The instance of the clicked RadCheckBox control.

  2. An eventArgs parameter of type Telerik.Web.UI.ButtonEventArgs, containing the following properties and methods:

    • get_commandName() - returns the value assigned to the RadCheckBox's CommandName property.

    • get_commandArgument() - returns the value assigned to the RadCheckBox's CommandArgument property.

This event can be used in scenarios where you need custom client-side code to be executed when the checkbox is clicked.

Example 1: Handling the OnClientClicked event.

<script type="text/javascript">
    function clientClick(sender, args) {
        var value = sender.get_value();
        $get("<%= Textbox1.ClientID %>").value = value;
    }
</script>

<span> Value:</span>
<asp:TextBox ID="Textbox1" runat="server" />

<telerik:RadCheckBox ID="RadCheckBox1" runat="server" AutoPostBack="false" Value="1"
    OnClientClicked="clientClick">
</telerik:RadCheckBox>

See Also