private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { int columna = dataGridView.CurrentCell.ColumnIndex; if (columna == 0) { FrmEditar frm = new FrmEditar(); frm.Show(); frm.txtIdEditar.Text = dataGridView.CurrentCell.Value.ToString(); } else { } }
private void btnEditar_Click(object sender, EventArgs e) { FrmEditar frm = new FrmEditar(); frm.Show(); }