This is a migrated thread and some comments may be shown as answers.

Fit Column Width to Content

3 Answers 410 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gerhard
Top achievements
Rank 1
Veteran
Gerhard asked on 21 Apr 2021, 11:19 AM

V2.23 includes the ability to fit column width to content. I can't see how to enable it. Does anyone know?

 

Regards,

Gerhard

3 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 21 Apr 2021, 05:22 PM

Hello Gerhard,

This is done by double clicking the borders between the column headers of a resizable grid. So, you also need to set the Resizable parameter of the grid to true. You can read more about the feature in the documentation: https://docs.telerik.com/blazor-ui/components/grid/columns/resize.

Regards,
Marin Bratanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Gerhard
Top achievements
Rank 1
Veteran
answered on 21 Apr 2021, 08:01 PM

Thank you Marin.

I misunderstood what this feature does. I was hoping that it could be automatic, i.e once the data has been loaded, the columns would auto-size to fit the data width and perhaps with min/max boundaries defined.

0
Marin Bratanov
Telerik team
answered on 22 Apr 2021, 05:44 AM

Hi Gerhard,

There are many reasons why that isn't implemented and one of the major ones is that rendering and data retrieval are decoupled, so firing up such functionality on load will cause flicker and will be a serious performance hit.

Nevertheless, you can Follow such a feature here: https://feedback.telerik.com/blazor/1513385-autofit-column-widths-on-data-load. I've also added your Vote for it.

Regards,
Marin Bratanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

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