Invisible columns mess up the autoFitColumns

Hi, when a invisible column is present in the grid the autoFitColumns doesn't work correctly, like show in the screenshots shared.

If the width of the column is set to 0 then the autoFitColumns works correctly.

Here is a link to stackblitz example, you can change the visible parameter and remove the width in the 'empty' column to test the behaviour mentioned.

https://stackblitz.com/edit/angular-11-new-wio6km?file=src%2Fapp%2Fapp.component.ts,src%2Fapp%2Fgrid%2Fgrid.module.ts,src%2Fapp%2Fgrid%2Fgrid.component.ts,src%2Fapp%2Fapp.module.ts,src%2Fapp%2Fapp.component.html,src%2Fapp%2Fgrid%2Fdatasource.ts,src%2Fstyles.css


Attachment: Desktop_6ed9542f.zip

3 Replies

AR Aishwarya Rameshbabu Syncfusion Team May 21, 2024 08:39 AM UTC

Hi Cesar Smerling,


Greetings from Syncfusion support.


We have confirmed the reported case as an issue from our side and logged it as “Autofit is not working properly when there is a invisible column with no width specified.” Thank you for taking time to report this issue and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technical feasibility and Product Development Life Cycle ) and will include the defect fix in our upcoming patch release which will be rolled out on “June 5th, 2024”. Until then you can define the width of the column as ‘auto’ to overcome the issue.


You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through the below link,


Feedback: https://www.syncfusion.com/feedback/57940/autofit-is-not-working-properly-when-there-is-a-invisible-column-with-no-width


Disclaimer: "Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization".



Regards

Aishwarya R



JS Johnson Soundararajan S Syncfusion Team June 5, 2024 05:42 PM UTC

Hi Cesar Smerling,

 

We sincerely apologise for the inconvenience caused.

 

We understand that you are eagerly awaiting the patch to address the matter, and we wanted to provide you with an update regarding the delay. Currently, we are encountering some complexity in addressing those cases. We will fix the reported issue with "Autofit is not working properly when there is a invisible column with no width specified" and include it in the first weekly patch release after the Vol 2 Main release, which is scheduled for June 19, 2024.

 

Again, we sincerely apologise for the delay and any inconvenience caused. We greatly appreciate your understanding and patience.

 

Regards,

Johnson Soundararajan S

  




AR Aishwarya Rameshbabu Syncfusion Team June 19, 2024 12:02 PM UTC

Hi Cesar Smerling,


We are glad to announce that, we have included the fix for the issue Autofit is not working properly when there is a invisible column with no width specified in our 26.1.38 release. So please upgrade to our latest version of the Syncfusion package to resolve the reported issue.


Root cause : 


The width of the hidden columns is also taken into account on the calculation of table width.


Solution :

Ensured the visibility of the columns before calculating the table width.


Feedback link :  https://www.syncfusion.com/feedback/57940/autofit-is-not-working-properly-when-there-is-a-invisible-column-with-no-width


Latest version working sample : https://stackblitz.com/edit/angular-xqwqsx-j6lhez?file=src%2Fapp.component.html,src%2Fapp.component.ts,package.json


We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require further assistance.


Regards,

Aishwarya R


Loader.
Up arrow icon