Dynamically Adjust Row Height for Better Readability

Posted by: andrea.davoli on 3 July 2025, 12:11 pm EST

  • Posted 3 July 2025, 12:11 pm EST - Updated 3 July 2025, 12:17 pm EST

    Hi,

    I previously opened a thread about dynamic column width [https://developer.mescius.com/forums/winforms-edition/column-widths-not-scaling-properly-across-resolutions], and you suggested using the StarWidth function — it works perfectly, thank you!

    Now I was wondering if there’s something similar for rows.

    I’m not necessarily looking to make them fill all available space, but I’d like them to automatically increase in height when the content becomes hard to read — ideally, when there is available space, like in the screenshot below.

    Thanks in advance for any advice!

  • Posted 4 July 2025, 2:39 am EST

    Hi Andrea,

    By default, the C1FlexGrid.Rows.DefaultSize property is set to -1, which allows the grid to automatically adjust the default row size based on the grid’s font size. However, if you set this property to a fixed value, that size will be used regardless of the font size.

    Furthermore, if you want to auto-size the rows based on their content, you can use the C1FlexGrid.AutoSizeRows() method. For more details, please refer to the Row-Sizing topic in our documentation - https://developer.mescius.com/componentone/docs/win/online-flexgrid/row-sizing.html

    Best Regards,

    Kartik

Need extra support?

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

Learn More

Forum Channels