Back to Devexpress

PivotFieldDisplayTextEventArgs.Value Property

wpf-devexpress-dot-xpf-dot-pivotgrid-dot-pivotfielddisplaytexteventargs-d6af2178.md

latest4.6 KB
Original Source

PivotFieldDisplayTextEventArgs.Value Property

Gets the processed item’s value.

Namespace : DevExpress.Xpf.PivotGrid

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

NuGet Package : DevExpress.Wpf.PivotGrid

Declaration

csharp
public override object Value { get; }
vb
Public Overrides ReadOnly Property Value As Object

Property Value

TypeDescription
Object

An object which represents the item’s value.

|

Remarks

If the PivotGridControl.FieldValueDisplayText event is raised for a field value header or total header, the Value property returns the value of the corresponding column field or row field. If this event is fired for a grand total header or data field header the Value property will return null. To determine the type of the currently processed header use the PivotFieldValueEventArgs.ValueType property.

If the PivotGridControl.FieldValueDisplayText event is fired for an item within a filter dropdown, the Value property returns the field’s value that corresponds to this item.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Value 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-pivot-grid-hide-specific-columns-and-row/CS/WpfApp/MainWindow.xaml.cs#L40

csharp
if (e.Field == pivot.Fields[PivotHelper.Month]) {
    e.DisplayText = CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName((int)e.Value);
}

wpf-pivot-grid-split-field-value-cells/CS/Window1.xaml.cs#L47

csharp
if(e.Field == pivotGrid.Fields[PivotHelper.Month]) {
    e.DisplayText = CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName((int)e.Value);
}

wpf-pivot-grid-hide-specific-columns-and-row/VB/WpfApp/MainWindow.xaml.vb#L50

vb
If e.Field Is pivot.Fields(PivotHelper.Month) Then
    e.DisplayText = CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(CInt(Fix(e.Value)))
End If

wpf-pivot-grid-split-field-value-cells/VB/Window1.xaml.vb#L45

vb
If e.Field Is Me.pivotGrid.Fields(Month) Then
    e.DisplayText = CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(CInt(e.Value))
End If

See Also

DisplayText

IsPopulatingFilterDropdown

PivotFieldDisplayTextEventArgs Class

PivotFieldDisplayTextEventArgs Members

DevExpress.Xpf.PivotGrid Namespace