Class GridContextMenuEventArgs
Provides data for the GridContextMenuOpening event.
Namespace: Syncfusion.UI.Xaml.Grid
Assembly: Syncfusion.SfGrid.WPF.dll
Syntax
public class GridContextMenuEventArgs : GridHandledEventArgs
Remarks
Use GridContextMenuEventArgs to customize or cancel the context menu that is being shown for a record, column, or group drop area in the SfDataGrid.
Constructors
GridContextMenuEventArgs(ContextMenu, Object, RowColumnIndex, ContextMenuType, Object)
Initializes a new instance of the GridContextMenuEventArgs class.
Declaration
public GridContextMenuEventArgs(ContextMenu contextMenu, object contextMenuInfo, RowColumnIndex rowColumnIndex, ContextMenuType contextMenuType, object originalSource = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Controls.ContextMenu | contextMenu | The ContextMenu that is being shown for the SfDataGrid. |
| System.Object | contextMenuInfo | An object that contains the information about the context menu. |
| RowColumnIndex | rowColumnIndex | The RowColumnIndex where the context menu is being opened. |
| ContextMenuType | contextMenuType | The ContextMenuType value that indicates the type of context menu being shown. |
| System.Object | originalSource | The original source of the event. |
Properties
ContextMenu
Gets or sets the shortcut menu associated with the SfDataGrid.
Declaration
public ContextMenu ContextMenu { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Windows.Controls.ContextMenu | The ContextMenu that is being shown for the SfDataGrid. |
ContextMenuInfo
Gets or sets an object that contains information about the context menu.
Declaration
public object ContextMenuInfo { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Object | An object that contains information about the context menu, such as the associated record or column. |
ContextMenuType
Gets or sets the type of the context menu.
Declaration
public ContextMenuType ContextMenuType { get; set; }
Property Value
| Type | Description |
|---|---|
| ContextMenuType | One of the ContextMenuType enumeration values that specifies the type of the context menu. |
RowColumnIndex
Gets or sets the RowColumnIndex where the context menu is opened.
Declaration
public RowColumnIndex RowColumnIndex { get; set; }
Property Value
| Type | Description |
|---|---|
| RowColumnIndex | The RowColumnIndex at which the context menu was opened. |