private void btnSua_Click(object sender, EventArgs e) { int rowIndex = dgvThongTinThe.SelectedRows[0].Index; frmThongTinThe frm = new frmThongTinThe( dgvThongTinThe.Rows[rowIndex].Cells[2].Value.ToString(), dgvThongTinThe.Rows[rowIndex].Cells[4].Value.ToString() ); //frm.MdiParent = this; frm.Show(); frm.BringToFront(); }
private void dgvThongTinThe_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex == -1) { return; } frmThongTinThe frm = new frmThongTinThe( dgvThongTinThe.Rows[e.RowIndex].Cells[2].Value.ToString(), dgvThongTinThe.Rows[e.RowIndex].Cells[4].Value.ToString() ); //frm.MdiParent = this; frm.Show(); frm.BringToFront(); }
void ShowThongTinThe() { try { int rowIndex = dgvThongTinThe.SelectedRows[0].Index; frmThongTinThe frm = new frmThongTinThe( dgvThongTinThe.Rows[rowIndex].Cells[2].Value.ToString(), dgvThongTinThe.Rows[rowIndex].Cells[4].Value.ToString() ); //frm.MdiParent = this; frm.Show(); frm.BringToFront(); } catch { } }