protected virtual void dataGridView2_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 0 && e.RowIndex >= 0) { StringBuilder sentence = new StringBuilder().AppendFormat("SELECT R.RoleId FROM TRANSA_SQL.Role R WHERE R.Name='{0}'", this.dataGridView2.CurrentRow.Cells[1].Value); int roleId = (int)Conexion.Instance.ejecutarQuery(sentence.ToString()).Rows[0][0]; ModificacionRoleForm modif = new ModificacionRoleForm(roleId); this.Hide(); modif.ShowDialog(); this.Show(); } }