windowsforms-devexpress-dot-xtragrid-dot-views-dot-grid-dot-popupmenushowingeventargs-ad3f6a37.md
Gets the type of the Grid View’s menu to be invoked.
Namespace : DevExpress.XtraGrid.Views.Grid
Assembly : DevExpress.XtraGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
public GridMenuType MenuType { get; }
Public ReadOnly Property MenuType As GridMenuType
| Type | Description |
|---|---|
| GridMenuType |
A GridMenuType enumeration value that specifies the type of the Grid View’s menu to be invoked.
|
Available values:
| Name | Description |
|---|---|
| User |
Custom context menu.
| | Summary |
Context menu for a summary footer.
| | Column |
Context menu for a column header.
| | Group |
Context menu for the group panel.
| | Row |
Context menu for a data row.
| | AutoFilter |
Context menu for the auto-filter row.
| | GroupRow |
Context menu for a group row.
|
The following code snippets (auto-collected from DevExpress Examples) contain references to the MenuType property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-grid-customize-footer-menu-calculate-custom-totals/CS/Form1.cs#L49
{
if (e.MenuType != DevExpress.XtraGrid.Views.Grid.GridMenuType.Summary) return;
winforms-grid-show-context-menu-for-rows/CS/FormGridMenu.cs#L16
private void gridView1_PopupMenuShowing(object sender, PopupMenuShowingEventArgs e) {
if (e.MenuType == GridMenuType.Row) {
popupMenu_Row.Tag = e.HitInfo;
winforms-grid-customize-footer-menu-calculate-custom-totals/VB/Form1.vb#L43
Private Sub gridView1_PopupMenuShowing(ByVal sender As Object, ByVal e As PopupMenuShowingEventArgs)
If e.MenuType <> GridMenuType.Summary Then Return
Dim footerMenu As DevExpress.XtraGrid.Menu.GridViewFooterMenu = TryCast(e.Menu, DevExpress.XtraGrid.Menu.GridViewFooterMenu)
winforms-grid-show-context-menu-for-rows/VB/FormGridMenu.vb#L17
Private Sub gridView1_PopupMenuShowing(sender As Object, e As PopupMenuShowingEventArgs)
If e.MenuType = GridMenuType.Row Then
popupMenu_Row.Tag = e.HitInfo
See Also
PopupMenuShowingEventArgs Class