private void gridView1_RowCellClick(object sender, RowCellClickEventArgs e) { if (e.Column.FieldName.ToUpper() == "E2") { frmYXCFDetail frmYXCFDetail = new frmYXCFDetail(e.CellValue.ToString(), this.gridView1.GetRowCellValue(e.RowHandle, "E3").ToString()); frmYXCFDetail.ShowDialog(); } }
private void grvYXCF_CellMouseUp(object sender, DataGridViewCellMouseEventArgs e) { if (this.grvYXCF.Columns[e.ColumnIndex].DataPropertyName == "E2") { frmYXCFDetail frmYXCFDetail = new frmYXCFDetail(this.grvYXCF.CurrentCell.Value.ToString().Trim(), this.grvYXCF.Rows[this.grvYXCF.CurrentCell.RowIndex].Cells["E3"].Value.ToString().Trim()); frmYXCFDetail.ShowDialog(); } }