How to know a specific checkbox inside datagridview is checked or not?

后端 未结 4 2150
遇见更好的自我
遇见更好的自我 2020-12-11 12:13

i had a gridview which has 2 columns , one is textbox column and other is checkbox column, how to know which checkbox is checked .

4条回答
  •  生来不讨喜
    2020-12-11 12:41

    it is as simple as this

    //replace the row number and column name with your own 
    if ((bool)dataGridView1.Rows[0].Cells["Column1"].Value)
     {
           //do your work
     }
    

提交回复
热议问题