我有一個DataGridView,它從數據庫中獲取值。現在我只想打印出用戶從UI中選擇的選定項目。如果用戶想要在DataGridView中打印出整個表格,這就是我所做的:如何將DataGridView中的選定項目作爲DataTable獲取?
var dataTable = dataGridView1.DataSource as DataTable;
現在我想在DataGridView中使用SelectedCells屬性。不能讓它雖然:-(
VAR selecteditems = dataGridView1.SelectedCells如數據表;
我在做什麼錯在這裏我要的是把我選定的單元格成?數據表。