Skip to main content
All docs
V24.2
Tab

ASPxGridViewContextMenuInitializeEventArgs.ContextMenu Property

Gets the context menu.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.2.dll

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