Back to Devexpress

PopupMenuShowingEventArgs.Field Property

windowsforms-devexpress-dot-xtrapivotgrid-dot-popupmenushowingeventargs.md

latest3.6 KB
Original Source

PopupMenuShowingEventArgs.Field Property

Gets the field whose header or value has been right-clicked by an end-user.

Namespace : DevExpress.XtraPivotGrid

Assembly : DevExpress.XtraPivotGrid.v25.2.dll

NuGet Package : DevExpress.Win.PivotGrid

Declaration

csharp
public PivotGridField Field { get; }
vb
Public ReadOnly Property Field As PivotGridField

Property Value

TypeDescription
PivotGridField

A PivotGridField object that represents the field whose header or value has been right-clicked by an end-user.

|

Remarks

To identify the area where the field is located, use the PivotGridMenuEventArgsBase.Area property.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Field 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-pivot-totals-visibility/CS/Form1.cs#L24

csharp
private void HandleHeaderShowMenu(DevExpress.XtraPivotGrid.PopupMenuShowingEventArgs e) {
    if(!IsLastAreaField(pivotGridControl1, e.Field))
        CreateToggleTotalsItem(e);

winforms-pivot-change-summarydisplaytype-in-context-menu/CS/WindowsApplication34/Form1.cs#L45

csharp
item.Click += new EventHandler(ItemClick);
item.Tag = e.Field;
sdtItem.Items.Add(item);

winforms-pivot-totals-visibility/VB/Form1.vb#L27

vb
Private Sub HandleHeaderShowMenu(ByVal e As DevExpress.XtraPivotGrid.PopupMenuShowingEventArgs)
    If Not IsLastAreaField(pivotGridControl1, e.Field) Then
        CreateToggleTotalsItem(e)

winforms-pivot-change-summarydisplaytype-in-context-menu/VB/WindowsApplication34/Form1.vb#L48

vb
AddHandler item.Click, AddressOf ItemClick
item.Tag = e.Field
sdtItem.Items.Add(item)

See Also

Area

PopupMenuShowingEventArgs Class

PopupMenuShowingEventArgs Members

DevExpress.XtraPivotGrid Namespace