Use attached project to reproduce!
Another case is when the font size is changed from the settings dialog - in this case, the row height is not adjusted.
Workaround:
Use the following custom print style:
class MyTableViewDefinitionPrintRenderer : TableViewDefinitionPrintRenderer
{
public MyTableViewDefinitionPrintRenderer(RadGridView grid) : base(grid)
{
}
protected override int GetDataRowHeight(GridViewRowInfo row, TableViewRowLayoutBase rowLayout)
{
int result = base.GetDataRowHeight(row, rowLayout);
int newHeight = 0;
if (!(row is GridViewGroupRowInfo))
{
foreach (GridViewColumn col in row.ViewTemplate.Columns)
{
if (col is GridViewRowHeaderColumn || col is GridViewIndentColumn || !col.IsVisible)
{
continue;
}
string value = row.Cells[col.Name].Value.ToString();
TableViewCellArrangeInfo info = ((TableViewRowLayout)rowLayout).LayoutImpl.GetArrangeInfo(col);
float cellWidth = (float)info.CachedWidth;
int currentHeight = TextRenderer.MeasureText(value, this.GridView.PrintStyle.CellFont, new Size((int)cellWidth, 0), TextFormatFlags.WordBreak).Height + this.GridView.Font.Height *4;
newHeight = Math.Max(newHeight, currentHeight);
}
}
return Math.Max(newHeight, result);
}
}
class MyPrintStyle :GridPrintStyle
{
protected override BaseGridPrintRenderer InitializePrintRenderer(RadGridView grid)
{
return new MyTableViewDefinitionPrintRenderer(grid);
}
}