How to change a table wide default font style to bold in WinForms GridControl?
Font settings
When an attribute of a cell’s style is not explicitly set for that cell, the unset attribute is inherited from the standard style, the column style, or the row style. For a cell that does not have the Font.Facename property set, the Font.Facename property of the row style is checked, then the column style, and finally the standard style. So, to change the default setting, you can change the setting to the standard style. The standard style is the basestyle stored within the grid’s basestyle.
C#
//Set the default style of the font to bold. GridStyleInfo standard = this.gridControl1.BaseStylesMap["Standard"].StyleInfo; standard.Font.Bold = true;
VB
'Set the default style of the font to bold. Dim standard As GridStyleInfo = Me.gridControl1.BaseStylesMap("Standard").StyleInfo standard.Font.Bold = True
After applying the properties, the output looks as follows:
Figure 1: Default style of the text set to bold
Samples: