Dear,
ASP.NET Web Forms in VB.NET.
I get a Circular Reference Error on
ASP._global_asax.
when adding a Foreign Key Column.
.VB
dsGoods.SelectParameters("CustomerID").DefaultValue = oUser.CustomerID
Dim index = dgLoads.Columns.FindIndex(Function(col) col.Field = "GoodType")
dgLoads.Columns.ElementAt(index).DataSource = dsGoods
.ASPX
<ej:Grid ID="dgLoads">
<ej:Column Field="GoodType" HeaderText="Type" ForeignKeyValue = "GoodDescription" ForeignKeyField = "GoodID" />
</ej:Grid>
<asp:SqlDataSource ID="dsGoods" runat="server" ConnectionString='<%$ ConnectionStrings:PSWEB %>'
SelectCommand="SELECT [GoodID], [GoodDescription] FROM [Goods] WHERE ([CustomerID] = @CustomerID)">
<SelectParameters>
<asp:Parameter Name="CustomerID" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
What's wrong?