Back to Devexpress

PivotGridFieldOptions.ShowValues Property

corelibraries-devexpress-dot-xtrapivotgrid-dot-pivotgridfieldoptions-07be78d6.md

latest3.9 KB
Original Source

PivotGridFieldOptions.ShowValues Property

Gets or sets whether data cells that correspond to the current data field are visible.

Namespace : DevExpress.XtraPivotGrid

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

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

Declaration

csharp
[DefaultValue(true)]
public bool ShowValues { get; set; }
vb
<DefaultValue(True)>
Public Property ShowValues As Boolean

Property Value

TypeDefaultDescription
Booleantrue

true if data cells that correspond to the current data field are visible; otherwise, false.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to ShowValues
PivotGridFieldBase

.Options .ShowValues

|

Remarks

Setting the ShowValues property to false doesn’t hide totals and grand totals that correspond to the current field.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ShowValues 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-pivotgrid--display-the-difference-of-income-and-outlay-in-totals/CS/PivotGridCustomSummaryExample/Form1.cs#L100

csharp
};
fieldValueTotal.Options.ShowValues = false;
pivotGridControl1.Fields.Add(fieldValueTotal);

winforms-pivotgrid--display-the-difference-of-income-and-outlay-in-totals/VB/PivotGridCustomSummaryExample/Form1.vb#L77

vb
Dim fieldValueTotal As PivotGridField = New PivotGridField With {.Area = DevExpress.XtraPivotGrid.PivotArea.DataArea, .AreaIndex = 0, .Caption = "Savings", .FieldName = "Savings", .Name = "fieldValueTotal"}
fieldValueTotal.Options.ShowValues = False
pivotGridControl1.Fields.Add(fieldValueTotal)

See Also

ShowGrandTotal

ShowTotals

PivotGridFieldOptions Class

PivotGridFieldOptions Members

DevExpress.XtraPivotGrid Namespace