Back to Devexpress

FieldValueCell.ValueType Property

wpf-devexpress-dot-xpf-dot-pivotgrid-dot-fieldvaluecell-3e02d225.md

latest4.6 KB
Original Source

FieldValueCell.ValueType Property

Gets the type of the cell.

Namespace : DevExpress.Xpf.PivotGrid

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

NuGet Package : DevExpress.Wpf.PivotGrid

Declaration

csharp
public FieldValueType ValueType { get; }
vb
Public ReadOnly Property ValueType As FieldValueType

Property Value

TypeDescription
FieldValueType

A FieldValueType enumeration member that specifies the type of the cell.

|

Available values:

NameDescription
Value

Corresponds to a field value.

| | Total |

Corresponds to an automatic total.

| | GrandTotal |

Corresponds to a grand total.

| | CustomTotal |

Corresponds to a custom total.

|

Remarks

The ValueType property defines whether the current cell represents a field value, or it is an automatic total, grand total or custom total column/row header. In the first instance, use the FieldValueCellBase.Value property to obtain the field value.

The following code snippets (auto-collected from DevExpress Examples) contain references to the ValueType 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#L33

csharp
if (object.Equals(cell.Value, "Employee B") &&
    cell.ValueType != FieldValueType.Total)
    e.Remove(cell);

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

csharp
new Predicate<FieldValueCell>(delegate(FieldValueCell matchCell) {
return matchCell.ValueType == FieldValueType.GrandTotal &&
    matchCell.Field == null;

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

vb
' it is removed with all corresponding rows.
If Object.Equals(cell.Value, "Employee B") AndAlso cell.ValueType <> FieldValueType.Total Then
    e.Remove(cell)

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

vb
' Only cells that match this predicate are split.
Dim condition As Predicate(Of FieldValueCell) = New Predicate(Of FieldValueCell)(Function(ByVal matchCell) matchCell.ValueType = FieldValueType.GrandTotal AndAlso matchCell.Field Is Nothing)
' Creates a list of cell definitions that represent newly created cells.

See Also

Value

FieldValueCell Class

FieldValueCell Members

DevExpress.Xpf.PivotGrid Namespace