Пример #1
0
 private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == dataGridView1.Columns["cRemark"].Index)
     {
         string _model = dataGridView1.Rows[e.RowIndex].Cells["cModel"].Value.ToString();
         string _norm = dataGridView1.Rows[e.RowIndex].Cells["cNorm"].Value.ToString();
         frmViewDetail fr = new frmViewDetail(_norm,_model);
         fr.ShowDialog();
     }
 }
Пример #2
0
 /// <summary>
 /// 单击单元格内容时发生
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == dataGridView1.Columns["cRemark"].Index)
     {
         string        _model = dataGridView1.Rows[e.RowIndex].Cells["cModel"].Value.ToString();
         string        _norm  = dataGridView1.Rows[e.RowIndex].Cells["cNorm"].Value.ToString();
         frmViewDetail fr     = new frmViewDetail(_norm, _model);
         fr.ShowDialog();
     }
 }