Home - Forums-.NET - FlyGrid.Net (Windows Forms) - How do I set Font on DynamicallyAutoDetectDataTypeColumn

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

How do I set Font on DynamicallyAutoDetectDataTypeColumn
Link Posted: 12-Mar-2006 21:19
Hello!

Assume I have defined these two columns with names Nr and Value.
vertGrid.Columns.Items.AddRange(new Column[]
{ new DynamicallyAutoDetectDataTypeColumn("Nr"),
   new DynamicallyAutoDetectDataTypeColumn("Value")
});

Now if I want to have another Font on this Nr and Value how do I do.

I tried to change column 0 with this but it didn't work.
I didn't get any errors but no Font was changed on column 0.
vertGrid.Columns.Items[0].Font = new Font("Arial",9,FontStyle.Bold);

//Tony
Link Posted: 13-Mar-2006 01:08
I've tried this code:
[C#]
//to change fond of cells
vertGrid.Columns.Items[0].Font = new Font(vertGrid.Font, FontStyle.Bold);
//to change font of column header
vertGrid.Columns.Items[0].HeaderFont = vertGrid.Columns.Items[0].Font;

and all works fine