Hi SF.
I see this same behavior when using the grid component.
I have used the template example from your documentation https://blazor.syncfusion.com/documentation/datagrid/editing/#dialog-template
Implementing the sample code works fine, however when I try to use http client to fetch the exact same data I start have GC problems, and grid does not work. Some times entire site does not work.
I made the following GET responder in my server side controller:
[HttpGet]
[Route("/api/getorders")]
public IEnumerable GetOrders()
{
List GridData = new List
{
new OrdersDetails() { OrderID = 10248, CustomerID = "VINET", Freight = 32.38, ShipCity = "Berlin",
OrderDate = DateTime.Now.AddDays(-2), ShipName = "Vins et alcools Chevalier",
ShipCountry = "Denmark", ShipAddress = "Kirchgasse 6" },
new OrdersDetails() { OrderID = 10249, CustomerID = "TOMSP", Freight = 11.61, ShipCity = "Madrid",
OrderDate = DateTime.Now.AddDays(-5), ShipName = "Toms Spezialitäten",
ShipCountry = "Brazil", ShipAddress = "Avda. Azteca 123" }
};
return GridData;
}
And then replaced the code for obtaining GridData with:
protected override async Task OnInitializedAsync()
{
GridData = await Http.GetFromJsonAsync>("/api/getorders");
}
I see data in the grid, but it is not fully rendered. The toolbar is missing, and the GC errors gets logged every second or so to the console.
It looks like any example I make with "data from the WASM page" works fine, but any time i try to pick up some data from my APIs th GC problem appears.
It makes no difference if I use SFdatamanager or just simple JSON call.
I can easily use the API from in my own written components, so API looks like working very fine.
I attached picture of my webservice in case the code above will not display right.
I hope you can find the problem.
Best regards
Christian W.
Attachment:
httpget_847504a8.zip