Skip to main content

GridViewSettings.ContextMenuItemClick Property

Enables you to perform custom actions when a context menu item has been clicked.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v24.2.dll

Declaration

public ASPxGridViewContextMenuItemClickEventHandler ContextMenuItemClick { get; set; }

Property Value

Type Description
ASPxGridViewContextMenuItemClickEventHandler

An ASPxGridViewContextMenuItemClickEventHandler delegate method allowing you to implement custom processing.

Remarks

Use the ContextMenuItemClick property to perform specific actions when a context menu item has been clicked (after the left mouse button is released). If the button is released when the mouse pointer is not over a thumbnail, the event doesn’t fire.

If you want to perform a custom action on a default context menu item click, set the ASPxGridViewContextMenuItemClickEventArgs.Handled property to true to prevent default actions.

You can use the event parameter’s properties to identify the clicked item (ASPxGridViewContextMenuItemClickEventArgs.Item), the menu type (ASPxGridViewContextMenuItemClickEventArgs.MenuType), and determine the index of the right-clicked row or column (ASPxGridViewContextMenuItemClickEventArgs.ElementIndex).

On the client side, you can respond to a context menu item click using the ASPxClientGridView.ContextMenuItemClick event.

See Also