Skip to main content
A newer version of this page is available. .
All docs
V20.2
Tab

ASPxGridViewContextMenuInitializeEventArgs.ContextMenu Property

Gets the context menu.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

NuGet Package: DevExpress.Web

Declaration

public GridViewContextMenu ContextMenu { get; }

Property Value

Type Description
GridViewContextMenu

The context menu.

Remarks

The following example illustrates how to add a new context menu item when a user right clicks a grid row (MenuType):

<dx:ASPxGridView ID="Grid" OnContextMenuInitialize="Grid_ContextMenuInitialize" >
    ...
</dx:ASPxGridView>
protected void Grid_ContextMenuInitialize(object sender, ASPxGridViewContextMenuInitializeEventArgs e) {
    if(e.MenuType == GridViewContextMenuType.Rows) {
        e.ContextMenu.Items.Add("Item name", "Command name");
    }
}
See Also