I want to change the color of some special words NOT all words in a gridview cell. Here is the code:
protected void gvContents_RowDataBound(obj
In the CellFormatting event handler, add the below code
void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) { if (e.Value != null && e.Value.ToString() == "Special") { e.CellStyle.ForeColor = Color.Red; } }