dotConnect for SQL Server Documentation
Devart.Data Namespace / DataLink Class / DataSource Property

In This Topic
    DataSource Property (DataLink)
    In This Topic
    Gets or sets the source containing a list of values used to populate the items within the control.
    Syntax
    'Declaration
     
    Public Shadows Property DataSource As Object
    public new object DataSource {get; set;}

    Property Value

    An IEnumerable or IListSource that contains a collection of values used to supply data to this control. The default value is a null reference.
    Remarks

    Use the DataSource property to specify the source of values to bind to a data listing control. A data source must be an object that implements either the System.Collections.IEnumerable interface (such as System.Data.DataView, System.Collections.ArrayList, or System.Collections.Hashtable) or the IListSource interface to bind to a control derived from the BaseDataList class. When you set the DataSource property, you must manually write the code to perform data binding.

    If the data source specified by the DataSource property contains multiple sources of data, use the DataMember property to specify the specific source to bind to the control. For example, if you have a System.Data.DataSet object with multiple tables, you must specify which table to bind to the control.

    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also