Ef Core with Lazy Loading brings infinite Loading Spinner in SfGrid

Hi,
I am working with your SfGrid and Ef Core in a Blazor Application. 
When I initialize the DbContext by DI in our Startup.cs like this:

services.AddDbContext(options => options.UseCosmos(cosmosUrl, cosmosKey, cosmosDatabase));

the data collection in the SfGrid, which came out of the database, is looking fine. All is displayed and works correct.
(FYI: it doesn't matter if I use the SQLServer or Cosmos DB Provider. Same result.)

But if I change the initialization to:

services.AddDbContext(options => options.UseLazyLoadingProxies().UseCosmos(cosmosUrl, cosmosKey, cosmosDatabase));

the application freezes in an infinite loop. Here an example screenshot:


The Spinner spins infinite, the site is freezed, no error output is shown up, the correct data is also displayed, but the text "no records to display", too. Which is curious.
It looks like, that the grid "searches" for the virtual navigation properties or something, although I do not use them.

After a long time the console shows:

but the website is still freezed.

What am I doing wrong? Did I missed something?
Thank you

1 Reply

RS Renjith Singh Rajendran Syncfusion Team April 16, 2020 02:58 PM UTC

Hi Denny, 

Thanks for contacting Syncfusion support. 

We have analyzed the reported problem. We need more details to further look into the problem. We request you to bind the “OnActionFailure” event to Grid. This event will be triggered for every failure in Grid. Please share the details you get in the “args” of this event handler for further analysis. 

And also kindly share with us the following details for better assistance. 
  1. Share the complete model class code you have bind to Grid. We need to check for the navigation property and also the type for the fields in the model class.
  2. Share the full Grid rendering codes.
  3. Share the details regarding any exception you have faced while running the application.

The provided information will help us analyze the problem, and provide you a solution as early as possible. 

Regards, 
Renjith Singh Rajendran. 


Loader.
Up arrow icon