We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Grid Foreign Key Column - Circular Reference

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?

1 Reply

FS Farveen Sulthana Thameeztheen Basha Syncfusion Team November 18, 2019 12:48 PM UTC

Hi Peter, 

Thanks for contacting Syncfusion Support. 

We have checked your query and we have already discussed about this requirement “Circular reference error while using Entity Framework/Linq 2 SQL” in our Syncfusion Knowledge Base. Refer to the below KB link:- 
 
Please get back to us if you need any further assistance. 

Regards, 
Fareen sulthana T 


Loader.
Live Chat Icon For mobile
Up arrow icon