SnapDocument.DataSources Property
Provides access to the collection of a document’s data sources.
Namespace: DevExpress.Snap.Core.API
Assembly: DevExpress.Snap.v21.2.Core.dll
NuGet Package: DevExpress.Snap.Core
Declaration
Property Value
Type | Description |
---|---|
DataSourceInfoCollection | A DataSourceInfoCollection object, specifying the collection of the data sources. |
Remarks
You can use two types of data sources bind SnapControl to data:
Application Data Source
A data source that is assigned to the SnapControl.DataSource property cannot be edited or removed from inside the Snap application and is always available for any document opened in it.
Use the SnapControl.DataSources property to access the control’s data sources collection.
A calculated field added to an application data source has no access to fields from document data sources.
Document Data Source
A data source that is specified from the user interface is assigned to the IDataSourceOwner.DataSource property of a currently opened SnapDocument.
To access the collection of a SnapDocument‘s data sources, use the DataSources property.
A calculated field added to a document data source can evaluate the field values that belong to the application data sources.
An application data source has a priority when it has a name identical to a document data source.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DataSources 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.