Home - Forums-.NET - FlyGrid.Net (Windows Forms) - SmartFit not taking font style into account

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

SmartFit not taking font style into account
Link Posted: 17-Jan-2007 06:03
I'm using SmartFit for some of the columns in my application.  The problem is that some of the rows in my grid are bolded and FlyGrid is only sizing the column based on the unbolded text width in the cell.  Can I get a fix for this or is there a work-around?

Thanks

Charles Gilbert
Deltek Systems
Source Version Customer
Link Posted: 17-Jan-2007 10:57
FlyGrid takes into account style of font.
Can you provide me with screenshot, may be we'll find workaround?
Probably this is a bug of System.Drawing - some of the GDI+ methods work incorrectly, without enough precision.
Link Posted: 18-Jan-2007 06:41
I looked at the FlyGrid source and I see the problem.  You use the FlyGrid.Font property to determine the width of the text in a cell but because I am changing the style via the CellDrawInfo.Font property (in Column.PaintCellValue() override) the font I use for the cell value does not necessarily match the FlyGrid.Font value.  Wouldn't it make more sense for you guys to base the text width in a cell on the dci.Font value?

Thanks for your prompt response.

Charles Gilbert