UI Freeze when assigning large DataSource to Grid with Columns with templates

We are running into an issue where we are implementing a SfGrid and we need to assign a DataSource of the Grid on the OnInitializedAsync() method. The problem is when we assign the list and the Grid renders, the UI freezes for a significant time. We have narrowed it down to having Templates in the Grid, when we remove those the UI loads the list immediately. We are not sure what we can do to use the SfGrid because no matter if its 1 record or 250 records, the UI Freezes for a while due to the templates. Can you recreate this and report back? I have tried to copy and paste my code, but it seems to delete it when I submit, but essentially assign a list of some entity at OnInitializedAsync() and have a grid with multiple columns that have Template and try to render it via a button.


1 Reply

SP Sarveswaran Palani Syncfusion Team February 13, 2024 01:30 AM UTC

Hi Sam,

Greetings from Syncfusion support.

From your query, when you have used large columns, and you are experiencing performance issues when rendering more columns in the grid. By enabling column virtualization, you can limit the number of elements rendered, which will help improve performance when dealing with a larger number of columns. Please refer to the attached documentation for more information.


Reference: https://blazor.syncfusion.com/documentation/datagrid/virtualization#column-virtualization

If you have facing any further issues, please get back to us with more details about your requirement and share grid code snippet or runnable sample to us.

Regards,
Sarvesh


Loader.
Up arrow icon