corelibraries-devexpress-dot-xtrapivotgrid-dot-data-dot-fieldvaluecellbase-db31c014.md
Gets the type of the cell.
Namespace : DevExpress.XtraPivotGrid.Data
Assembly : DevExpress.PivotGrid.v25.2.Core.dll
NuGet Packages : DevExpress.PivotGrid.Core, DevExpress.Win.Navigation
public PivotGridValueType ValueType { get; }
Public ReadOnly Property ValueType As PivotGridValueType
| Type | Description |
|---|---|
| PivotGridValueType |
A PivotGridValueType enumeration member that specifies the type of the cell.
|
Available values:
| Name | Description |
|---|---|
| Value |
Corresponds to a field value.
| | Total |
Corresponds to an automatic total.
| | GrandTotal |
Corresponds to a grand total.
| | CustomTotal |
Corresponds to a custom total.
|
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.
winforms-dashboard-pivot-custom-export/CS/WinformsExport/Form1.cs#L133
if(rowName.Contains(cell.Value.ToString().Trim()) &&
cell.ValueType != PivotGridValueType.Total)
e.Remove(cell);
winforms-pivot-grid-hide-specific-columns-and-rows/CS/Form1.cs#L37
if (object.Equals(cell.Value, "Employee B") &&
cell.ValueType != PivotGridValueType.Total)
e.Remove(cell);
winforms-pivot-split-field-value-cells/CS/Form1.cs#L31
new Predicate<FieldValueCell>(delegate(FieldValueCell matchCell) {
return matchCell.ValueType == PivotGridValueType.GrandTotal &&
matchCell.Field == null;
web-forms-pivot-grid-split-field-value-cells/CS/ASPxPivotGrid_SplittingCells/Default.aspx.cs#L27
new Predicate<FieldValueCell>(delegate(FieldValueCell matchCell) {
return matchCell.ValueType == PivotGridValueType.GrandTotal &&
matchCell.Field == null;
if (object.Equals(cell.Value, "Employee B") &&
cell.ValueType != PivotGridValueType.Total)
e.Remove(cell);
winforms-dashboard-pivot-custom-export/VB/WinFormsExport/Form1.vb#L138
If rowName.Contains(cell.Value.ToString().Trim()) AndAlso cell.ValueType <> PivotGridValueType.Total Then
e.Remove(cell)
winforms-pivot-grid-hide-specific-columns-and-rows/VB/Form1.vb#L43
' it is removed with all corresponding rows.
If Object.Equals(cell.Value, "Employee B") AndAlso cell.ValueType <> PivotGridValueType.Total Then
e.Remove(cell)
winforms-pivot-split-field-value-cells/VB/Form1.vb#L33
' Only cells that match this predicate are split.
Dim condition As New Predicate(Of FieldValueCell)(Function(matchCell As FieldValueCell) matchCell.ValueType =
PivotGridValueType.GrandTotal AndAlso matchCell.Field Is Nothing)
web-forms-pivot-grid-split-field-value-cells/VB/ASPxPivotGrid_SplittingCells/Default.aspx.vb#L28
' Only cells that match this predicate are split.
Dim condition As Predicate(Of FieldValueCell) = New Predicate(Of FieldValueCell)(Function(ByVal matchCell) matchCell.ValueType = PivotGridValueType.GrandTotal AndAlso matchCell.Field Is Nothing)
' Creates a list of cell definitions that represent newly created cells.
' it is removed with all corresponding rows.
If Equals(cell.Value, "Employee B") AndAlso cell.ValueType <> PivotGridValueType.Total Then e.Remove(cell)
Next
See Also