private void dataGridRol1_CellContentClick(object sender, DataGridViewCellEventArgs e) { // Ignore clicks that are not in our if (e.ColumnIndex == dataGridRol1.Columns["buttonSelection"].Index && e.RowIndex >= 0) { Rol rolSel = new Rol(Convert.ToInt32(dataGridRol1.Rows[e.RowIndex].Cells["Id"].Value),JanadianDateDB.RemoveSpecialCharacters( Convert.ToString(dataGridRol1.Rows[e.RowIndex].Cells["Nombre"].Value)), getFuncionalidadRol(dataGridRol1.Rows[e.RowIndex].Cells["comboFuncionalidadRol"]), Convert.ToBoolean(dataGridRol1.Rows[e.RowIndex].Cells["Habilitado"].Value)); Form frm = new ModificacionRol(rolSel); frm.Show(this); } }
private void BT_modificar_Click(object sender, EventArgs e) { ModificacionRol re = new ModificacionRol(DGV_rol.SelectedRows[0]); re.FormClosed += new FormClosedEventHandler(ListadoRol_Load); re.ShowDialog(); }