Proper way to render grid where all columns have AutoFit="true"

In the attached sample,  all columns in the grid have autofit set to true, but when the grid display it first show the columns enlarged and then they autofit.  Is this the normal behavior or is there a better way to prevent/eliminate this flick ? I have read the excelent documentation from this link and tried different aproaches but at no avail so far


Attachment: Blazor1_4ade1dcd.zip

1 Reply 1 reply marked as answer

VN Vignesh Natarajan Syncfusion Team December 9, 2021 04:54 AM UTC

Hi Ben,  
 
Thanks for contacting Syncfusion support.  
 
Query: “ Is this the normal behavior or is there a better way to prevent/eliminate this flick ?  
 
Yes, this is default behavior of Grid when GridColumns are enabled for autofit. Because AutoFit feature will calculate an Column’s width based on the content of that column. (i.e.) AutoFit action will take place only after datasource is bound to Grid. So initially Grid is rendered with default defined setup and later (after binding data) calculate the column’ width. Hence a flick appear while autofitting the column. It will not be possible to prevent / eliminate this flick.     
 
Please get back to us if you have further queries.  
 
Regards, 
Vignesh Natarajan 


Marked as answer
Loader.
Up arrow icon