GridViewContextMenu.Items Property
In This Article
Gives access to context menu items.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
NuGet Package: DevExpress.Web
#Declaration
public GridViewContextMenuItemCollection Items { get; }
#Property Value
Type | Description |
---|---|
Grid |
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