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


The OnButtonClick client-side event handler is called when the user clicks on a button associated with the input control. This can be the button that is displayed when the ShowButton property is True, or one of the spin buttons that is displayed when the ShowSpinButtons property is True.

Two parameters are passed to the event handler:

  • sender is the input control.

  • eventArgs has the following methods:

    • set_cancel() lets you prevent the default response to the button click.

    • get_buttonType() returns an integer that indicates which button was clicked. The possible values are

      • 1 or Telerik.Web.UI.InputButtonType.Button—The button that appears when the ShowButton property is True.

      • 2or Telerik.Web.UI.InputButtonType.MoveUpButton—The upward spin button.

      • 3 or Telerik.Web.UI.InputButtonType.MoveDownButton—The downward spin button.

Use the OnButtonClick event to provide a client-side response when the user clicks on a button:

<telerik:RadNumericTextBox RenderMode="Lightweight" ID="RadNumericTextBox1" runat="server" ShowButton="True">
    <ClientEvents OnButtonClick="ToggleEnabled" />
<script type="text/javascript">
    function ToggleEnabled(sender, eventArgs)
        if (sender.get_enabled())
In this article
Not finding the help you need? Improve this article