aspnet-devexpress-dot-web-dot-aspxdatawebcontrol.md
Specifies the control’s data source ID.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
public override string DataSourceID { get; set; }
Public Overrides Property DataSourceID As String
| Type | Description |
|---|---|
| String |
The control’s ID.
|
This property cannot be set by themes or style sheet themes.
ASPxGridView:
<dx:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False"
DataSourceID="SqlDataSource1" KeyFieldName="ProductID" >
</dx:ASPxGridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\nwind.mdb;Persist Security Info=True"
ProviderName="System.Data.OleDb"
SelectCommand="SELECT [ProductID], [ProductName], [UnitPrice], [UnitsInStock] FROM [Products]">
</asp:SqlDataSource>
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DataSourceID 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.
asp-net-web-forms-bind-webchartcontrol-to-data/CS/Default.aspx.cs#L9
protected void Button1_Click(object sender, EventArgs e) {
WebChartControl1.DataSourceID = "AccessDataSource1";
WebChartControl1.SeriesDataMember = "Year";
asp-net-web-forms-bind-webchartcontrol-to-data/VB/Default.aspx.vb#L10
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs)
WebChartControl1.DataSourceID = "AccessDataSource1"
WebChartControl1.SeriesDataMember = "Year"
See Also