Back to Devexpress

FieldValueCellBase.Value Property

corelibraries-devexpress-dot-xtrapivotgrid-dot-data-dot-fieldvaluecellbase-f3f59ff1.md

latest5.2 KB
Original Source

FieldValueCellBase.Value Property

Gets the field value represented by the cell.

Namespace : DevExpress.XtraPivotGrid.Data

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

NuGet Packages : DevExpress.PivotGrid.Core, DevExpress.Win.Navigation

Declaration

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

Property Value

TypeDescription
Object

The field value represented by the cell.

|

Remarks

To obtain whether the current cell represents a field value, or it is an automatic total, grand total or custom total column/row header, use the FieldValueCellBase.ValueType property. If the cell is a total, grand total or data field header, the Value property returns null.

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.

winforms-pivot-grid-hide-specific-columns-and-rows/CS/Form1.cs#L36

csharp
// it is removed with all corresponding rows.
if (object.Equals(cell.Value, "Employee B") &&
    cell.ValueType != PivotGridValueType.Total)

wpf-pivot-grid-hide-specific-columns-and-row/CS/WpfApp/MainWindow.xaml.cs#L32

csharp
// it is removed with all corresponding rows.
if (object.Equals(cell.Value, "Employee B") &&
    cell.ValueType != FieldValueType.Total)

web-forms-pivot-grid-hide-particular-rows-and-columns/CS/ASPxPivotGrid_HidingColumnsAndRows/Default.aspx.cs#L32

csharp
// it is removed with all corresponding rows.
if (object.Equals(cell.Value, "Employee B") &&
    cell.ValueType != PivotGridValueType.Total)

winforms-dashboard-pivot-custom-export/VB/WinFormsExport/Form1.vb#L134

vb
Dim cell As FieldValueCell = e.GetCell(False, i)
If cell?.Value Is Nothing Then
    Continue For

winforms-pivot-grid-hide-specific-columns-and-rows/VB/Form1.vb#L43

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

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)

web-forms-pivot-grid-hide-particular-rows-and-columns/VB/ASPxPivotGrid_HidingColumnsAndRows/Default.aspx.vb#L32

vb
' 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

ValueType

FieldValueCellBase Class

FieldValueCellBase Members

DevExpress.XtraPivotGrid.Data Namespace