Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は dataGridView を持っていて、実行時に dataGridView を埋めます グリッドを更新しようとすると、エラーが発生します:
「このリストはクリアされていません。」
DataGrid_A.Rows.Clear() GetDataGrid()
どうすればこの問題を解決できますか? なにか提案を?
次のコードを使用して、目的の結果を得ることができます
do { foreach (DataGridViewRow row in DataGrid_A.Rows) { try { DataGrid_A.Rows.Remove(row); } catch (Exception) { } } } while (DataGrid_A.Rows.Count > 1);