![](/img/trans.png)
[英]Prevent first cell of DataGridView from being selected when row header clicked
[英]How to prevent the last row of a databound datagridview from being sorted on column header clicked?
我有一個數據綁定的datagridview。 我插入一個新行,代表特定列中值的總和。 問題是我無法阻止對這一行進行排序(它應該始終是網格中的最后一行)! 可能嗎?
謝謝你的答案!
無法測試,但這應該可以解決問題
dataGridView.Columns[dataGridView.ColumnCount - 1].SortMode = DataGridViewColumnSortMode.NotSortable;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.