Skip to main content
All docs
V21.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

SnapControl.DataSources Property

Provides access to the collection of SnapControl data sources.

Namespace: DevExpress.Snap

Assembly: DevExpress.Snap.v21.2.dll

NuGet Package: DevExpress.Win.Snap

#Declaration

[DXCategory("Data")]
public DataSourceInfoCollection DataSources { get; }

#Property Value

Type Description
DataSourceInfoCollection

A DataSourceInfoCollection object.

#Remarks

The data binding in Snap can be accomplished by creating a data source of one of the following types.

  • Application Data Source

    A data source that is assigned to the SnapControl.DataSource property cannot be edited or removed from within of the Snap application and is always available for any document opened in it.

    To access the collection of a SnapControl‘s data sources, use the DataSources property.

    A calculated field that is added to an application data source has no access to fields from document data sources.

  • Document Data Source

    A data source that is specified via the user interface of a Snap application is assigned to the IDataSourceOwner.DataSource property of a currently opened SnapDocument.

    To access the collection of a SnapDocument‘s data sources, use the SnapDocument.DataSources property.

    A calculated field that is added to a document data source can evaluate the field values that belong to the application data sources.

An application data source is given priority when it has a name identical to a document data source.

The supports the following data source types:

  • System.Collections.IList
  • System.ComponentModel.ITypedList
  • System.ComponentModel.IBindingList
  • IList<T>
  • IEnumerable<T>

#Implements

See Also