ASPxDataWebControlBase.DataSource Property
Specifies the object from which the data-bound control retrieves its data items.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
NuGet Package: DevExpress.Web
#Declaration
#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 ASPx
The Data
See Also: How to: Change the Mail Merge data sources at runtime
#Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the DataSource 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.