Skip to main content

PivotFileDataSource(String, ICustomObjectConverter) Constructor

Initializes a new instance of the PivotFileDataSource class, and loads pivot grid data from the specified file.

Namespace: DevExpress.Data.PivotGrid

Assembly: DevExpress.PivotGrid.v24.1.Core.dll

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

Declaration

public PivotFileDataSource(
    string fileName,
    ICustomObjectConverter customObjectConverter
)

Parameters

Name Type Description
fileName String

A String that specifies the name of the file from which to load data.

customObjectConverter ICustomObjectConverter

An object that implements the ICustomObjectConverter interface, which is a custom serializer.

Remarks

After the PivotFileDataSource object has been created, assign it to pivot grid’s PivotGridControl.DataSource property, to pass the data to the Pivot Grid Control.

To restore pivot grid data from a stream, use another overload of the constructor that takes a Stream parameter.

If some of the data source field values are custom objects (not numeric or string values), use the customObjectConverter parameter, to specify a serializer to be used to process them. It must be equal (i.e. be able to process objects of the same types in the same way) to the serializer used to save the data source to the file or stream (the one stored in the PivotGridOptionsData.CustomObjectConverter property when the data source was saved).

See Also