Skip to main content
You are viewing help content for a version that is no longer maintained/updated.
All docs
V21.2
  • DataSourceInfoCollection.Add(String, Object) Method

    Adds the specified object to the collection and returns the newly created object.

    Namespace: DevExpress.Snap.Core.API

    Assembly: DevExpress.Snap.v21.2.Core.dll

    NuGet Package: DevExpress.Snap.Core

    Declaration

    public DataSourceInfo Add(
        string name,
        object dataSource
    )

    Parameters

    Name Type Description
    name String

    A String value, specifying the name of the added object.

    dataSource Object

    A Object value, specifying the data source object.

    Returns

    Type Description
    DataSourceInfo

    A DataSourceInfo object.

    Remarks

    A specific data source in the collection can be accessed via the DataSourceInfoCollection.Item property.

    To remove a data source from the collection, use the DataSourceInfoCollection.Remove method.

    The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Add(String, Object) method.

    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.

    See Also