Skip to main content
Tab

ASPxDataWebControl.DataSourceID Property

Specifies the control’s data source ID.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v22.2.dll

NuGet Package: DevExpress.Web

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

See Also