mardi 14 février 2017

C# - DatagridView with Checkbox column cell click

  • Pls everyone help me.... if i click the datagridview checkbox columns 1 to 4 rows, but 1,2,3 rows only false 4th row wasn't false...??? for eg: 1 to 5 rows means 5th rows wasn't false.... why..?? If you provide more details we can provide better help.... Coding and project file have been mentioned below.......

              int i=0;
      foreach (DataGridViewRow item in dataGridView14.Rows)
      {
          if (item.Cells[0].Value != null)
    
              if (bool.Parse(item.Cells[0].Value.ToString()))
              {
                  item.Cells[0].Value = false;
                  MessageBox.Show("Selected Rows : " + item.Cells[0].RowIndex.ToString() + "  and serial No is" + item.Cells[1].Value.ToString());
              } }
    
    



Aucun commentaire:

Enregistrer un commentaire