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

Excel Sort values in ascending order using function TEXTJOIN

 Excel ::  Text ::  1,3,5,2,9,5,11 Result :: 1,2,3,5,5,9,11 Formula ::     TEXTJOIN ( ",",1,SORT(MID(SUBSTITUTE( A1 ,","...