private void dgDivisionList_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (dgDivisionList.SelectedRows.Count > 0) { frmDivisionEdit pDivisionEdit = new frmDivisionEdit(this); pDivisionEdit.DivisionCode = dgDivisionList.SelectedRows[0].Cells[0].Value.ToString(); pDivisionEdit.ShowDialog(); } }
private void tbtnModify_Click(object sender, EventArgs e) { if (dgDivisionList.SelectedRows.Count > 0) { frmDivisionEdit pDivisionEdit = new frmDivisionEdit(this); pDivisionEdit.DivisionCode = dgDivisionList.SelectedRows[0].Cells[0].Value.ToString(); pDivisionEdit.ShowDialog(); } }