Tengo un DataGridView1 , como puedo ponerle color de fondo a todo esa fila.
Colo amarillo o rojo.
Código vb:
Ver original
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim dt As New DataTable("People") dt.Columns.Add("First Name") dt.Columns.Add("Last Name") dt.Columns.Add("Occupation") dt.Rows.Add(New Object() {"Rod", "Stephens", "Nerd"}) dt.Rows.Add(New Object() {"Sergio", "Aragones", _ "Cartoonist"}) dt.Rows.Add(New Object() {"Eoin", "Colfer", "Author"}) dt.Rows.Add(New Object() {"Terry", "Pratchett", "?"}) DataGridView1.Rows("Rod").DefaultCellStyle.BackColor = Color.Yellow DataGridView1.DataSource = dt End Sub