private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 0) { MessageBox.Show("cell clicked"); int i = e.RowIndex; DataGridViewRow row = dataGridView1.Rows[i]; // string id = row.Cells[0].Value.ToString(); string reg = row.Cells[2].Value.ToString(); List <string> l = new List <string>(); // l.Add(id); l.Add(reg); if (flag == 1) { Groupstudent frm = new Groupstudent(Convert.ToInt32(row.Cells[1].Value), l); frm.Show(); } else if (flag == 2) { updategrp f = new updategrp(Convert.ToInt32(row.Cells[1].Value), l); f.Show(); } } }
private void linkLabel5_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { Groupstudent frm = new Groupstudent(); frm.Show(); }