Thursday, August 23, 2012

DataGridviewCell Fore color/Font Weight

Here's the code to apply font weight and font color to your datagridview cell.
Code:
DataGridViewCellStyle style = new DataGridViewCellStyle();  
style.ForeColor = Color.Red;  
style.Font = new Font(this.Font, FontStyle.Bold);  
dg.Rows[dg.Rows.Count - 1].Cells[i + 2].Style = style; 
Greg

0 comments:

Post a Comment