DataLoadingEventArgs.OverwriteDataSourceProperty Property
Specifies whether the DataSource and DataMember properties of the DashboardObjectDataSource are set when data is supplied in the event handler.
Namespace: DevExpress.DashboardCommon
Assembly: DevExpress.Dashboard.v24.2.Core.dll
Declaration
Property Value
Type | Description |
---|---|
Boolean | True, to set the DataSource and DataMember properties; otherwise, false. |
Remarks
The DataLoading event allows you to supply data to the DashboardObjectDataSource instance. Recently, when you handle the event and assign the data source to the e.Data property, the DataSource property of the DashboardObjectDataSource is set to the specified data source. The data source type is serialized and included in the dashboard xml definition file. This behavior may cause portability problems because a custom data type is not recognizable by external dashboard applications.
Starting with 19.2, the DashboardObjectDataSource converts the data supplied in the event handler to fill its internal storage. The original data type information is discarded, and the DashboardObjectDataSource.DataSource property is left unchanged.
You have the option to revert to the old behavior. In the DataLoading event handler set the e.OverwriteDataSourceProperty to true:
dashBoard1.DataLoading += (s, e) => {
e.OverwriteDataSourceProperty = true;
e.Data = MyCustomDataSource;
};
AddHandler dashBoard1.DataLoading, Sub(s, e)
e.OverwriteDataSourceProperty = True
e.Data = MyCustomDataSource
End Sub