Wednesday, 5 June 2013

windows- gridview specific header cell font and cell font

this.dataGridView1.ColumnHeadersDefaultCellStyle.Font = new Font(this.dataGridView1.ColumnHeadersDefaultCellStyle.Font, FontStyle.Bold);
For Single Header Column
this.dataGridView1.Columns[0].HeaderCell.Style.Font = new Font(this.Font, FontStyle.Bold);
For Column
this.dataGridView1.Columns[0].DefaultCellStyle.Font = new Font(this.Font, FontStyle.Bold);

No comments:

Post a Comment

How to highlight selected text in notepad++

  –> To highlight a block of code in Notepad++, please do the following steps step-1  :- Select the required text. step-2  :- Right click...