I am trying to show rows in a DataGridView.
Here\'s the code:
foreach (Customers cust in custList) { string[] rowValues =
foreach (Customers cust in custList) { DataGridViewRow row = new DataGridViewRow(); dataGridView1.BeginEdit(); row.Cells["Name"] = cust.Name; row.Cells["Phone"] = cust.PhoneNo; row.Tag = cust.CustomerId; dataGridView1.Rows.Add(row); dataGridView1.EndEdit(); }
try this