Skip to main content

PivotGridControl.DataSource Property

Gets or sets the PivotGridControl data source.

Namespace: DevExpress.Xpf.PivotGrid

Assembly: DevExpress.Xpf.PivotGrid.v14.2.dll

#Declaration

[Bindable(true)]
public object DataSource { get; set; }

#Property Value

Type Description
Object

An object that contains data for PivotGridControl.

#Remarks

Assigning a new value to the DataSource property raises the PivotGridControl.DataSourceChanged event, and causes a pivot grid update.

PivotGridControl is not updated automatically when the current data source is modified. To force the pivot grid update, use the PivotGridControl.ReloadData method.

To recalculate summary values without reloading data from the underlying data source, use the PivotGridControl.RefreshData method.

NOTE

The PivotGridControl.DataSourceChanged event is raised and the pivot grid is updated when the data source implementing the IBindingList interface raises the ListChanged event of the PropertyDescriptorAdded, PropertyDescriptorDeleted, PropertyDescriptorChanged or Reset type.

To retrieve data from a data source asynchronously, assign it using the PivotGridControl.SetDataSourceAsync method instead of the DataSource property.

To learn more on data binding, see Providing Data.

See Also