DatagridView Cell border style based on cell contents in C#.
Posted on 2012-04-11
I need to change the cell borders in a datagridview based on it's content. I've figured out how to change the background color but I can't access the border style...
for (int i = 0; i < this.gamesDataGridView.Rows.Count; i++)
string cellValue = gamesDataGridView[COL_ID_GAME_TYPE, i].Value.ToString();
if (cellValue == "3")
//adjust background color
this.gamesDataGridView[COL_ID_4Q, i].Style.BackColor = Color.LightSlateGray;
// adjust border style to sunken?