Skip to main content
All docs
V25.1
  • Tab

    ASPxGridViewContextMenuInitializeEventArgs.CreateItem(GridViewContextMenuCommand) Method

    Creates a new context menu item.

    Namespace: DevExpress.Web

    Assembly: DevExpress.Web.v25.1.dll

    #Declaration

    #Parameters

    Name Type Description
    command GridViewContextMenuCommand

    The command.

    #Returns

    Type Description
    GridViewContextMenuItem

    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