jeudi 27 décembre 2018

Display Datagridview dynamically created chechboxvalue? c#

I stored the value of my dynamically created Checkboxes and now I want to display the stored value upon reload of the windowsform. I tried various versions but none work out. They all change the value to "true" but it doesn't get displayed! I put the code for test purposes directly after creating each checkbox column but it still doesn't show...Please help

foreach (DataGridViewRow row in WarDataGridView.Rows)
  {
    for (int col = 1; col < WarDataGridView.ColumnCount; col++)
    {
     (WarDataGridView.Rows[row.Index].Cells[col] as DataGridViewCheckBoxCell).Value = true;

    }
  }




Aucun commentaire:

Enregistrer un commentaire