Skip to main content
A newer version of this page is available. .
Tab

ASPxDataWebControl.DataSourceID Property

Specifies the control’s data source ID.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v19.2.dll

Declaration

public override string DataSourceID { get; set; }

Property Value

Type Description
String

The control’s ID.

Remarks

This property cannot be set by themes or style sheet themes.

Example

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>

Online Demo

The following code snippets (auto-collected from DevExpress Examples) contain references 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.

See Also