ASPxGridViewContextMenuInitializeEventArgs.CreateItem(GridViewContextMenuCommand) Method
In This Article
Creates a new context menu item.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
NuGet Package: DevExpress.Web
#Declaration
public GridViewContextMenuItem CreateItem(
GridViewContextMenuCommand command
)
#Parameters
Name | Type | Description |
---|---|---|
command | Grid |
The command. |
#Returns
Type | Description |
---|---|
Grid |
The context menu item. |
#Remarks
<dx:ASPxGridView ID="Grid" OnContextMenuInitialize="Grid_ContextMenuInitialize" >
...
</dx:ASPxGridView>
protected void Grid_ContextMenuInitialize(object sender, ASPxGridViewContextMenuInitializeEventArgs e) {
if(e.MenuType == GridViewContextMenuType.Rows) {
GridViewContextMenuItem item = e.CreateItem(GridViewContextMenuCommand.Refresh);
...
}
}
See Also