[英]How to delete only the data in the rows (prevent the rows to be deleted) in datagridview
我試圖刪除行中的數據值,但它也刪除了DataGridView中的行。
代碼:
spSumGrid.Sheets [0] .Rows.Clear(); //刪除表中的數據和行
But I want to delete only the data in the row..
請提供更多后端信息。 您可以在DataGridView數據源上使用LINQ,並通過此操作選擇所需的行,而不是輕松刪除。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.