Hello,
I need to change the font of the gridview + header Programmatically.
The gridview rows I can change successively in the cellformating event
private void radGridViewProductie_CellFormatting(object sender, CellFormattingEventArgs e)
{
e.CellElement.Font = Mo.LetterType;
}
The header row i change after binding the gridview.
See the following code
schrapViewBindingSource.DataSource = Schraplijst;
radGridViewProductie.DataSource = schrapViewBindingSource;
radGridViewProductie.MasterGridViewTemplate.BestFitColumns();
GridViewRowInfo Row = this.radGridViewProductie.MasterGridViewInfo.TableHeaderRow;
foreach (GridViewCellInfo gi in Row.Cells)
{
if (gi.CellElement != null)
{
gi.CellElement.Font = Mo.LetterType;
}
}
This works but the problem is when I comment out the BestFitColumns the Cellelement always returns null
What is the best way to change the font of the header row.?
Wich event can I use for that ?
Greetings Tim