Home Forums WinForms controls Xceed Grid for WinForms bold Font Reply To: bold Font

User (Old forums)
Post count: 23064

You need to set the Font property of the cell or the row. However, all properties on a System.Drawing.Font are ReadOnly, so when you want to change an attribute on a font, you need to create a new one and pass it to the Font property.


cell.Font = new Font( cell.Font.FontFamily, cell.Font.Size, FontStyle.Bold );
row.Font = new Font( row.Font.FontFamily, row.Font.Size, FontStyle.Bold );

Of course you can define a whole new font (e.g. cell.Font = new Font( “Arial”, 10, FontStyle.Bold );), but you likely want to keep the exact same font, and only make it bold.

Imported from legacy forums. Posted by André (had 2965 views)