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


The server-side ButtonClick event occurs when the user clicks on a button, causing a postback.

The event handler function receives two arguments:

  1. The RadRibbonBar which has fired the event. This argument is of type object, but can be cast to the RadRibbonBar type.

  2. An EventArgs object with the following properties:

    • Button - the clicked button.

    • Group - the parent group of the clicked button.

    • Index - the index of the clicked button in its containing group.

<telerik:RadRibbonBar RenderMode="Lightweight" ID="RadRibbonBar1" runat="server" OnButtonClick="RadRibbonBar1_ButtonClick">
    <telerik:RibbonBarTab Text="Home">
        <telerik:RibbonBarGroup Text="Clipboard" EnableLauncher="true">
                <telerik:RibbonBarButton Size="Medium" Text="Cut" ImageUrl="icons/Cut.png" />
                <telerik:RibbonBarButton Size="Medium" Text="Copy" ImageUrl="icons/Copy.png" />
<asp:Literal runat="server" ID="Literal1"></asp:Literal>

protected void RadRibbonBar1_ButtonClick(object sender, RibbonBarButtonClickEventArgs e)
    Literal1.Text += "Text: " + e.Button.Text + "<br/>";

Protected Sub RadRibbonBar1_ButtonClick(sender As Object, e As RibbonBarButtonClickEventArgs)
    Literal1.Text += "Text: " + e.Button.Text + "<br/>"
End Sub 

See Also

In this article