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


The OnClientButtonClicking client-side event occurs when the user clicks on a toolbar button, before the toolbar responds to the mouse click.

The event handler receives two parameters:

  1. The instance of the toolbar firing the event.

  2. An eventArgs parameter containing the following methods:

  • get_item returns a reference to the toolbar item that was clicked. In this case it is a RadToolBarButton.

  • set_cancel lets you prevent the toolbar from responding to the mouse click.

  • get_domEvent - returns the browser's event object.

You can use this event to pre-process an item click or to cancel the default response:

    function OnClientButtonClicking(sender, args) {

<telerik:RadToolBar RenderMode="Lightweight" ID="RadToolBar1" runat="server" Orientation="Horizontal" 
    <CollapseAnimation Duration="200" Type="OutQuint" />
        <telerik:RadToolBarButton Text="button1" runat="server">
        <telerik:RadToolBarDropDown Text="dropdown" runat="server">
                <telerik:RadToolBarButton Text="Button2" runat="server">
In this article