Back to Devexpress

PivotGridOptionsChartDataSourceBase.ProvideCellValuesAsType Property

corelibraries-devexpress-dot-xtrapivotgrid-dot-data-dot-pivotgridoptionschartdatasourcebase-772e80af.md

latest4.3 KB
Original Source

PivotGridOptionsChartDataSourceBase.ProvideCellValuesAsType Property

Gets or sets the type to which cell values are converted, before they are exported to the Chart Control.

Namespace : DevExpress.XtraPivotGrid.Data

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

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

Declaration

csharp
[Browsable(false)]
[DefaultValue(null)]
public virtual Type ProvideCellValuesAsType { get; set; }
vb
<DefaultValue(Nothing)>
<Browsable(False)>
Public Overridable Property ProvideCellValuesAsType As Type

Property Value

TypeDefaultDescription
Typenull

A Type object, representing the type to which cell values are converted.

|

Remarks

If the ProvideCellValuesAsType property is set to null , cell values are not converted before export, unless the pivot grid contains multiple data fields with different data types. In this instance, cell values are converted to Double (if possible).

To specify the type to which the column field and row field values are converted, use the PivotGridOptionsChartDataSourceBase.ProvideColumnFieldValuesAsType and PivotGridOptionsChartDataSourceBase.ProvideRowFieldValuesAsType properties, respectively.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ProvideCellValuesAsType 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-customize-pivot-grid-data-before-displaying-it-in-a-chart-control/CS/Form1.cs#L45

csharp
pivotGridControl1.OptionsChartDataSource.ProvideColumnFieldValuesAsType = typeof(string);
pivotGridControl1.OptionsChartDataSource.ProvideCellValuesAsType = typeof(int);
CreateEncodeTables();

winforms-customize-pivot-grid-data-before-displaying-it-in-a-chart-control/VB/Form1.vb#L49

vb
pivotGridControl1.OptionsChartDataSource.ProvideColumnFieldValuesAsType = GetType(String)
pivotGridControl1.OptionsChartDataSource.ProvideCellValuesAsType = GetType(Integer)
CreateEncodeTables()

See Also

ProvideColumnFieldValuesAsType

ProvideRowFieldValuesAsType

PivotGridOptionsChartDataSourceBase Class

PivotGridOptionsChartDataSourceBase Members

DevExpress.XtraPivotGrid.Data Namespace