ASPxGridViewContextMenuInitializeEventArgs.ContextMenu Property
Gets the context menu.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
Declaration
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