FlexGrid - Auto-adjust row height based on font size / content

Posted by: andrea.davoli on 28 April 2026, 10:37 am EST

  • Posted 28 April 2026, 10:37 am EST

    Hi everyone,

    I’m working with FlexGrid and I’ve run into an issue that I can’t seem to solve.

    I would like the row height to automatically adjust based on the font size or content inside the cells. Right now, if I increase the font size, the text gets clipped instead of the row height expanding accordingly.

    Is there any built-in option or setting that enables automatic row height adjustment based on content or font size?

    If not, what would be the recommended approach to achieve this behavior?

    Thanks in advance!

  • Posted 29 April 2026, 1:54 am EST

    Hello Andrea,

    We were unable to reproduce the behavior where changing the font size clips the text in the grid. On our end, the row height automatically adjusts according to the font size. We have attached a sample project demonstrating the same for your reference. (see FlexAutoHeight.zip)

    → “Is there any built-in option or setting that enables automatic row height adjustment based on content or font size?”

    Yes, to automatically adjust row heights based on your font size or content, FlexGrid provides two built-in methods: AutoSizeRow() and AutoSizeRows().

    If you want to fix a specific row, you can use AutoSizeRow(). If you need to adjust a whole range of cells or the entire grid at once, you should use AutoSizeRows(). These methods look at the content and expand the height so nothing gets clipped. For more information, you can refer to our official documentation at https://developer.mescius.com/componentone/docs/win/online-flexgrid/row/row-sizing#auto-adjust-row-height

    Note: Please call the auto-sizing methods only after the data is loaded and the font is changed so that FlexGrid knows on what basis to calculate the height.

    Regrads,

    Uttkarsh.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels