Skip to main content
Tab

ASPxDataWebControlBase.DataSource Property

Specifies the object from which the data-bound control retrieves its data items.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v23.1.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(null)]
public virtual object DataSource { get; set; }

Property Value

Type Default Description
Object null

The data source object from which the data-bound control retrieves its data.

Remarks

Use the DataBind() method to bind a control to the specified data source.

You cannot specify this property in a theme.

<dx:ASPxTitleIndex ID="ASPxTitleIndex1" runat="server">
    <!-- ... -->
</dx:ASPxTitleIndex>
protected void Page_Load(object sender, EventArgs e) {
    string[] names = File.ReadAllLines(Server.MapPath("~/App_Data/customers.txt"), Encoding.Unicode);
    ASPxTitleIndex1.DataSource = names;
    ASPxTitleIndex1.DataBind();
}

Note

For ASPxRichEdit only:

The DataSource property specifies a data source for the Mail Merge feature. The property accepts an object that implements the IList interface. If a bound data source contains multiple data tables, use the DataMember property to specify a data member.

See Also: How to: Change the Mail Merge data sources at runtime

See Also