简体   繁体   中英

How to prevent the last row of a databound datagridview from being sorted on column header clicked?

I have a databound datagridview. I insert a new row representing a sum of values from a specific column. The issue is I cannot prevent this row from being sorted (it should be always the last row in the grid)! Is it possible?

thx for your answers!

无法测试,但这应该可以解决问题

dataGridView.Columns[dataGridView.ColumnCount - 1].SortMode = DataGridViewColumnSortMode.NotSortable;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM