FlexGrid provides DefaultSize property of the RowCollection class to set row height across the grid. You can also specify the height of a particular row by setting Height property of the Row class. Default value of the Height property is -1 which indicates that the row is taking height specified by the DefaultSize property.
Use the code below to set the default height of a row of the WinForms FlexGrid.
To adjust the row height according to text length and word wrapping options, FlexGrid provides the AutoSizeRow() and AutoSizeRows() methods. While AutoSizeRow() method automatically adjusts height of the specified row, the AutoSizeRows() method is used for cell ranges.
Following code shows how you can auto adjust the row height according to the text length in the WinForms FlexGrid.
FlexGrid allows you to set bounds to the row height by using the MinSize and MaxSize properties of the RowCollection class. This feature is especially useful in scenarios such as when AllowResizing property is set to true or while using the AutoSizeRow() or AutoSizeRows() method.
Specify the bounds of row height in the WinForms FlexGrid using the code below.