Hi all
Have this code so that when a checkbox in a column of my datagridview is checked, then the corresponding cell in column 2 (of the same row the check box is in) will turn blue with font color white.
I'd also like to add a line so that as well as the cell going blue, the bottom border of the cell disappears, so cellborderstyle = none.Code:If DataGridView1.Columns(e.ColumnIndex).Name = "Column15" Then 'Choose the color based on the checkbox cell value. Dim clr12 As Color If DataGridView1.Rows(e.RowIndex).Cells("Column10").Value = True Then clr12 = Color.Blue End If DataGridView1.Rows(e.RowIndex).Cells("Column2").Style.BackColor = Color.Blue DataGridView1.Rows(e.RowIndex).Cells("Column2").Style.ForeColor = Color.White
Can't get it to work
Help is appreciated,
M




Reply With Quote
