Autosize Columns programmatically

1 Answer 43 Views
Grid
Bob
Top achievements
Rank 1
Iron
Veteran
Iron
Bob asked on 13 May 2021, 01:40 PM

I know you can autosize a column by double clicking on the column edge, but is there any way this can be done programmatically?

I would like the grid to automatically size the columns to fit there content when the grid is first displayed.

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 13 May 2021, 02:09 PM

Hi Bob,

You can follow such a feature here: https://feedback.telerik.com/blazor/1513384-programmatically-invoke-fit-to-width-functionality-for-the-grid-columns.

You may also want to Follow this one about this happening automatically, but considering the caveats such a thing would have, I cannot say at this point whether it will become a feature or you would invoke as desired a call to resize columns when you see fit (e.g., after you update the grid data through OnRead): https://feedback.telerik.com/blazor/1513385-autofit-column-widths-on-data-load.

Regards,
Marin Bratanov
Progress Telerik

Тhe web is about to get a bit better! 

The Progress Hack-For-Good Challenge has started. Learn how to enter and make the web a worthier place: https://progress-worthyweb.devpost.com.

Tags
Grid
Asked by
Bob
Top achievements
Rank 1
Iron
Veteran
Iron
Answers by
Marin Bratanov
Telerik team
Share this question
or