Donate

How To Apply Fore Color Or Font Weight To DataGridView Cell

Here's the code to apply font weight and font color to your datagridview cell.
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; 

Comments

Donate

Popular Posts From This Blog

WPF CRUD Application Using DataGrid, MVVM Pattern, Entity Framework, And C#.NET

How To Insert Or Add Emojis In Microsoft Teams Status Message

Bootstrap Modal In ASP.NET MVC With CRUD Operations