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("Personas") dt.Columns.Add("Nombre") dt.Rows.Add(New Object() {TextBox1.Text}) DataGridView1.DataSource = dt DataGridView1.Rows(0).DefaultCellStyle.BackColor = Color.Yellow End Sub