title: how to fire click event on cells of daragridview table in c#
body: <p>event handler code.</p>
  
  <pre><code>    private void dataGridView2_Click(object sender, DataGridViewCellEventArgs e)
      {
              DataGridViewImageCell cell = (DataGridViewImageCell)
              dataGridView2.Rows[e.RowIndex].Cells[e.ColumnIndex];
              if (cell.Value=="sewagram express")
              {
                  SqlCommand cm1 = new SqlCommand("select * from sewagram", con);
                  DataTable dth = new DataTable();
                  SqlDataAdapter da = new SqlDataAdapter(cm1);
                  da.Fill(dth);
                  dataGridView1.DataSource = dth;
              }
      }
  </code></pre>