i have a datagridview which has a column name of tableNumber. i would like to fill this column from the code.
this is my method which i call in formload
public void GetAndFillReservationTables()
{
ManagerTableReservation mgrTableReservation = new ManagerTableReservation();
for (int a = 0; a < dgvReservation.Rows.Count; a++)
{
int reservationID = Convert.ToInt32(dgvReservation.Rows[a].Cells[0].Value.ToString());
List<int> listOfReservationTables = mgrTableReservation.GetReservationTablesByReservationID(reservationID);
string tables = "";
foreach (int t in listOfReservationTables)
{
tables = tables + "," + t.ToString();
}
dgvReservation.Rows[a].Cells[7].Value = tables;
}
}
it works correctly but it does not show the table value in the datagridview when i run my application