New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

ButtonClick

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.

ASPNET
<telerik:RadRibbonBar RenderMode="Lightweight" ID="RadRibbonBar1" runat="server" OnButtonClick="RadRibbonBar1_ButtonClick">
    <telerik:RibbonBarTab Text="Home">
        <telerik:RibbonBarGroup Text="Clipboard" EnableLauncher="true">
            <Items>
                <telerik:RibbonBarButton Size="Medium" Text="Cut" ImageUrl="icons/Cut.png" />
                <telerik:RibbonBarButton Size="Medium" Text="Copy" ImageUrl="icons/Copy.png" />
            </Items>
        </telerik:RibbonBarGroup>
    </telerik:RibbonBarTab>
</telerik:RadRibbonBar>
<asp:Literal runat="server" ID="Literal1"></asp:Literal>
C#
	
protected void RadRibbonBar1_ButtonClick(object sender, RibbonBarButtonClickEventArgs e)
{
    Literal1.Text += "Text: " + e.Button.Text + "<br/>";
}
	

See Also

In this article
See Also
Not finding the help you need?
Contact Support