New to KendoReact? Start a free 30-day trial

Environment

Product Version3.0.0
ProductProgress® KendoReact

Description

How can I set the width of the Grid column based on the content. I want the column width to be set based on the longest value in the column.

Solution

For the column auto width, we can suggest using a package called calculate-size or similar which will calculate the size of the text based on the font. Then we can use that information to dynamically set the width of the column:

Example
View Source
Edit In Stackblitz  
Change Theme:

In this article

Not finding the help you need?