Private Sub DataGridView1_CellFormatting(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles ActionsLogDataGridView.CellFormatting For j = 0 To Me.ActionsLogDataGridView.RowCount - 1 Dim Cell = Me.ActionsLogDataGridView.Rows(j).Cells.Item("ActionImportance") Dim col As Color Select Case Cell.Value.ToString Case "Low" col = Color.Green Case "Moderate" col = Color.Yellow Case "high" col = Color.Red End Select Cell.Style.BackColor = col Next End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)