//este le dice que hacer cuando le dan al botn de modificar del grid private void dgvProducts_CellClick(object sender, DataGridViewCellEventArgs e) { // la clumna 16 pertenece a donde está el link de modificar if (e.ColumnIndex == 16) { int idoficial = (int)dgvProducts.CurrentRow.Cells["Id"].Value; //MessageBox.Show("mensaje" + idoficial.ToString()); FrmEdicion form3 = new FrmEdicion(); form3.txtIdProdEd.Text = idoficial.ToString(); form3.ShowDialog(); } }
private void btnNuevo_Click_1(object sender, EventArgs e) { FrmEdicion form2 = new FrmEdicion(); form2.ShowDialog(); }