It is necessary to fill in the entire row for certain text in the dataGridView. I only managed to paint over 1 cell. How to make that would be painted over the whole row?
My code is below.
private void Color() { for (int i = 0; i<dataGridView1.RowCount; i++) { for (int j = 0; j< dataGridView1.Columns.Count; j++) { dataGridView1[j, i].Style.ForeColor = System.Drawing.Color.Black; switch (dataGridView1[j, i].FormattedValue.ToString().ToLower()) { case "удален": dataGridView1[j, i].Style.BackColor = System.Drawing.Color.Green; break; } } } }