如何刪除鍵盤上的選定行刪除鍵按下(從dataGridView中刪除並從數據庫中刪除)?如何刪除鍵盤上的dataGridView行刪除鍵按? c#
這裏我怎麼填充的dataGridView:
private void GetDate()
{
SqlDataAdapter adapter = new SqlDataAdapter("SELECT id as [ID],description as [Description],unit as [Unit], qty as [Quantity],unitRate as [Unit Rate], amount as [Amount], _datetime as [Date] FROM tbl_BOQ WHERE projectId = "+id, conn);
adapter.SelectCommand.CommandType = CommandType.Text;
DataTable table = new DataTable();
table.Clear();
adapter.Fill(table);
dataGridView1.DataSource = table;
}
嗨,表現出一定的代碼,如何是你的網格人口稠密?你的頁面/表單看起來如何? ASP.NET或Windows窗體? –
它是Windows窗體應用程序不是ASP.NET – Amer
hei ..how你做了這個..plz幫助我 – minakshi