title: How to know a specific checkbox inside datagridview is checked or not?
body: <p>i had  a gridview which has 2 columns , one is textbox column and other is checkbox column, how to know which checkbox is checked .</p>
  
  <p><img src="https://i.stack.imgur.com/yKA9a.jpg" alt="enter image description here"></p>
  
  <p>As shown in image ,suppose any of the checkbox is checked , i want to display that the corresponding text box value to that checkbox.</p>
  
  <p>can anyone help me?i tried the below code , but problem which i am facing is that , the values is getting displayed once i clicked to next checkbox then the previously checked checkbox values is getting displayed..</p>
  
  <pre><code>dataGridView1.CellValueChanged += new DataGridViewCellEventHandler(dataGridView1_CellValueChanged);
  
    void dataGridView1_CellValueChanged(object sender, DataGridViewCellEventArgs e)
      {  
          object tempObj = dataGridView1.Rows[e.RowIndex].Cells[1].Value;
           dataGridView1_CurrentCellDirtyStateChanged(sender, e);
  
          if (((e.ColumnIndex) == 1) &amp;&amp; ((bool)dataGridView1.Rows[e.RowIndex].Cells[1].Value))
          {
              MessageBox.Show(dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString());
  
          }
      }
  </code></pre>