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

ItemClick

The server-side ItemClick event occurs when the user clicks on a menu item, causing a postback.

The ItemClick event handler receives two arguments:

  1. The RadMenu that contains the clicked item. This argument is of type object, but can be cast to the RadMenu type.

  2. A RadMenuEventArgs object. This object has an Item property that you can use to access the item that was clicked.

Use the ItemClick event handler to respond when the user clicks an item in the menu.

Markup

ASP.NET
<telerik:RadMenu ID="RadMenu1" runat="server" OnItemClick="RadMenu1_ItemClick">
</telerik:RadMenu>

<telerik:RadContextMenu ID="RadContextMenu1" runat="server" OnItemClick="RadContextMenu1_ItemClick">
</telerik:RadContextMenu>

Code behind

C#
protected void RadMenu1_ItemClick(object sender, RadMenuEventArgs e)
{ 
    Telerik.Web.UI.RadMenuItem ItemClicked = e.Item; 
    Response.Write("Server event raised -- you clicked: " + ItemClicked.Text); 
}

protected void RadContextMenu1_ItemClick(object sender, RadMenuEventArgs e)
{
    Telerik.Web.UI.RadMenuItem ItemClicked = e.Item;
    Response.Write("Server event raised -- you clicked: " + ItemClicked.Text);
}

See Also

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