Exception when field is in embedded object

I'm getting this exception when the field is in an embedded object, in this case, Product. I've tried hardcoding the field to "Sku" but that doesn't work. Is there a workaround?

     "Uncaught (in promise) TypeError: Converting circular structure to JSON"

<SfGrid DataSource="@salesRecordResults" AllowSorting="true" AllowFiltering="true">
<GridEvents TValue="SalesRecordResult"></GridEvents>
<GridColumns>
<GridColumn Field=@nameof(SalesRecordResult.Id) HeaderText="Id" IsPrimaryKey="true" IsIdentity="true" Visible="false"></GridColumn>
<GridColumn Field=@nameof(SalesRecordResult.SaleDate) HeaderText="Sale Date" Format="yyyy-MM-dd" Width="150"></GridColumn>
<GridColumn Field=@nameof(SalesRecordResult.SalesChannel) HeaderText="Sales Channel"></GridColumn>
<GridColumn Field=@nameof(SalesRecordResult.Product.Sku) HeaderText="SKU"></GridColumn>
</GridColumns>
...
</SfGrid>


1 Reply 1 reply marked as answer

JP Jeevakanth Palaniappan Syncfusion Team April 23, 2021 05:44 AM UTC

Hi Andy, 

Greetings from Syncfusion support. 

We have checked your query and we suspect that you want to bind complex data to the grid. If so we suggest you to refer the below documentation link for your reference, 


 

If you are still facing any issues then kindly share us the below details, 

  1. Share us the Syncfusion NuGet version.
  2. Share us the video demo showing the reported problem.
  3. Kindly share us the issue reproducing sample with your model class bounded to the grid.

The above requested details will be helpful for us to validate the issue and provide you with a better solution as early as possible. 

Regards, 
Jeevakanth SP. 


Marked as answer
Loader.
Up arrow icon