0
我正在從mysql加載我的表,並且想要創建第一列鏈接。我的意思是鏈接到另一種形式。我想顯示學生的詳細信息,當點擊名稱程序時會打開一個新表格並顯示關於學生的所有信息。任何人有任何想法如何做?將表的第一列設置爲鏈接
DataTable table = new DataTable();
MySqlDataAdapter adapsql = new MySqlDataAdapter("SELECT name, surname, dob, sex, nationality, mobile, notes FROM student", connection);
adapsql.Fill(table);
dataGridView1.DataSource = table;
int x = (dataGridView1.RowCount)-1;
label21.Text = Convert.ToString(x);
cmd = connection.CreateCommand();
cmd.CommandText = @"SELECT * FROM reservation";
MySqlDataReader Reader = cmd.ExecuteReader();
if (!Reader.HasRows) return;
while (Reader.Read())
{
reservation.Add(Convert.ToInt16(GetDBString("roomID", Reader)));
}
Reader.Close();
謝謝!這工作真棒:) – QueenOfError 2013-04-26 14:48:37