Back to Devexpress

PivotCellBaseEventArgs.DataField Property

wpf-devexpress-dot-xpf-dot-pivotgrid-dot-pivotcellbaseeventargs-9ff4ffdf.md

latest2.6 KB
Original Source

PivotCellBaseEventArgs.DataField Property

Gets the data field which identifies the column where the processed cell resides.

Namespace : DevExpress.Xpf.PivotGrid

Assembly : DevExpress.Xpf.PivotGrid.v25.2.dll

NuGet Package : DevExpress.Wpf.PivotGrid

Declaration

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

Property Value

TypeDescription
PivotGridField

A PivotGridField object which identifies the column where the processed cell resides.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DataField 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.

wpf-pivotgrid-hide-column-totals/CS/HowToBindToMDB/MainWindow.xaml.cs#L43

csharp
if (e.ColumnValueType == FieldValueType.GrandTotal
       && e.DataField == fieldDiscount)
    e.Value = null;

wpf-pivotgrid-hide-column-totals/VB/HowToBindToMDB/MainWindow.xaml.vb#L37

vb
Private Sub PivotGridControl1_CustomCellValue(ByVal sender As Object, ByVal e As PivotCellValueEventArgs)
    If e.ColumnValueType = FieldValueType.GrandTotal AndAlso e.DataField Is fieldDiscount Then
        e.Value = Nothing

See Also

PivotCellBaseEventArgs Class

PivotCellBaseEventArgs Members

DevExpress.Xpf.PivotGrid Namespace