private void btnModificar_Click(object sender, EventArgs e) { if (dgvSubcategoria.CurrentCell.RowIndex >= 0) { frmSubcategoria fr = new frmSubcategoria(); fr.subcate = temList[dgvSubcategoria.CurrentCell.RowIndex]; AbrirVentana(fr); LoadGrid(); } else { MessageBox.Show("Debes selecciona un elemento para poder modificar"); } }
private void dgvSubcategoria_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { frmSubcategoria fr = new frmSubcategoria(); fr.subcate = temList[dgvSubcategoria.CurrentCell.RowIndex]; AbrirVentana(fr); LoadGrid(); }