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

GridViewContextMenu.Items Property

Gives access to context menu items.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

NuGet Package: DevExpress.Web

Declaration

public GridViewContextMenuItemCollection Items { get; }

Property Value

Type Description
GridViewContextMenuItemCollection

The collection of context menu items.

Remarks

<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");
    }
}

Online Demo

See Also