How do I make the font of a forecolor bold when I use this below code dg.ForeColor = System.Drawing.Color.Black; How do I make it bold?
Thanks, pooja
i think this post answers your question:
How to make row in gridview bold and regular programatically
cheers:)
You can use this code (which you can also find in the designer.cs):
var dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.dataGridView1.DefaultCellStyle = dataGridViewCellStyle1;
Something like