0
下面的代碼給我取一個行值從文本框的datagridview ......加載多個文本框的值到datagridview的
private void button1_Click(object sender, EventArgs e)
{
DataTable table = new DataTable();
table.Columns.Add("Course Name", typeof(string));
table.Columns.Add("Credit", typeof(string));
table.Rows.Add(txtName.Text.Trim(), txtCredit.Text.Trim());
addcrsView.DataSource = table;
}
當我給另一個值文本框,它只是取代了以前的一個。但我需要在datagrid視圖中同時使用這兩個視圖。
由於我是初學者,請將您的答案詳細信息。
非常感謝,它的那麼容易...... ... :-) – user3103779
你能告訴我如何將這個多重值從gridview保存到數據庫..... @Tun Zarni Kyaw感謝advace – user3103779
好吧,如果它和我rks,然後點擊答案旁邊的**勾號**。 ...爲了將多個值保存到數據庫,發佈一個新問題 –