Home - Forums-.NET - FlyGrid.Net (Windows Forms) - ActiveRootPort.GetTotalHeight()

FlyGrid.Net (Windows Forms)

.NET Datagrid - Fast, highly customizable, industry standards .NET data grid control for WinForms

This forum related to following products: FlyGrid.Net

ActiveRootPort.GetTotalHeight()
Link Posted: 27-Mar-2006 00:37
Hi,

I have a problem with ActiveRootPort.GetTotalHeight() and chaning font size in the grid.
Shouldn't GetTotalHeight return the total required height?
However, when I call it before and after I change the font size on the grid and all columns, I get the the same height back.
How can I get the required height for the grid after I changed the font size?

Thanks,

Tom
Link Posted: 30-Mar-2006 10:36
The FlyGridViewPort.GetTotalHeight result depends on FlyGridViewPort.Rows.DefaultRowHeight or row heights.
Font changing doesn't affect GetTotalHeight's results.
Link Posted: 30-Mar-2006 10:52
Additionally: if you haven't specified Rows.DefaultRowHeight, the Font changing will change DefaultRowHeight to fit text in the cells. Change of Font in this case will affect GetTotalHeight results.
Link Posted: 30-Mar-2006 11:07
That's not true. I have no DefaultRowHeight set and changing the Font doesn't change the value GetTotalHeight returns
Link Posted: 30-Mar-2006 12:35
Try to set DefaultRowHeight to -1, this clears current DefaultRowHeight and will be used the DefaultRowHeight that depends on Font.Height.
Link Posted: 02-Apr-2006 06:42
This sample http://kingvest.de/bugs/WindowsApplication9.rar shows that what you suggested does not work
Link Posted: 04-Apr-2006 04:02
Thanks for the sample, this incorrecntess is fixed.
Link Posted: 09-Apr-2006 06:33
thx, works correctly now