corelibraries-devexpress-dot-xtrapivotgrid-dot-pivotgridfieldbase-92200998.md
Gets or sets whether the field is visible.
Namespace : DevExpress.XtraPivotGrid
Assembly : DevExpress.PivotGrid.v25.2.Core.dll
NuGet Packages : DevExpress.PivotGrid.Core, DevExpress.Win.Navigation
[DefaultValue(true)]
public virtual bool Visible { get; set; }
<DefaultValue(True)>
Public Overridable Property Visible As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | true |
true if the field is visible; false otherwise.
|
If a field is hidden it can still be accessed via the Customization form. To prevent a hidden field from being displayed within the Customization form set its PivotGridFieldOptions.ShowInCustomizationForm property to false.
The following code snippets (auto-collected from DevExpress Examples) contain references to the Visible 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-connect-to-an-olap-datasource/CS/WinOlapRetrieveFieldsExample/Form1.cs#L33
pivotGridControl1.Fields["[Customer].[Country].[Country]"].Area = PivotArea.RowArea;
pivotGridControl1.Fields["[Customer].[Country].[Country]"].Visible = true;
pivotGridControl1.Fields["[Customer].[City].[City]"].Area = PivotArea.RowArea;
fieldSalesPerson1.DisplayFolder = "Employees";
fieldSalesPerson1.Visible = false;
web-forms-pivot-grid-change-summary-display-mode/CS/SummaryDisplayMode/Default.aspx.cs#L44
if(SourceDataField != null)
cbShowRawValues.Checked = SourceDataField.Visible;
ConfigureSummaryDisplayTypeComboBox(SelectedGroup);
{
if (!groupField.Visible || groupField.Area == PivotArea.FilterArea || groupField.Area == PivotArea.DataArea)
return true;
winforms-pivot-totals-visibility/CS/Form1.cs#L30
for(int i = 0; i < pivotGridControl.Fields.Count; i++) {
if(pivotGridControl.Fields[i].Visible && pivotGridControl.Fields[i].Area == field.Area
&& pivotGridControl.Fields[i].AreaIndex > field.AreaIndex)
winforms-pivot-grid-connect-to-an-olap-datasource/VB/WinOlapRetrieveFieldsExample/Form1.vb#L34
pivotGridControl1.Fields("[Customer].[Country].[Country]").Area = PivotArea.RowArea
pivotGridControl1.Fields("[Customer].[Country].[Country]").Visible = True
pivotGridControl1.Fields("[Customer].[City].[City]").Area = PivotArea.RowArea
fieldSalesPerson1.DisplayFolder = "Employees"
fieldSalesPerson1.Visible = False
web-forms-pivot-grid-change-summary-display-mode/VB/SummaryDisplayMode/Default.aspx.vb#L67
cbAllowCrossGroupVariation.Visible = isVariation
If SourceDataField IsNot Nothing Then cbShowRawValues.Checked = SourceDataField.Visible
ConfigureSummaryDisplayTypeComboBox(SelectedGroup)
Public Shared Function ShouldCalculateCustomValue(ByVal groupField As PivotGridField, ByVal e As PivotGridCustomSummaryEventArgs) As Boolean
If Not groupField.Visible OrElse groupField.Area = PivotArea.FilterArea OrElse groupField.Area = PivotArea.DataArea Then
Return True
winforms-pivot-totals-visibility/VB/Form1.vb#L34
For i As Integer = 0 To pivotGridControl.Fields.Count - 1
If pivotGridControl.Fields(i).Visible AndAlso pivotGridControl.Fields(i).Area = field.Area AndAlso pivotGridControl.Fields(i).AreaIndex > field.AreaIndex Then
Return False
See Also