2012-08-06 82 views

回答

1

你有2种选择:

  1. 通过DataGridView的财产。转到编辑列并将SortMode选项更改为NotSortable。

  2. 通过代码。写下你想禁用排序的每一列。

    dataGridView1.Columns[ColumnNumber].SortMode = DataGridViewColumnSortMode.NotSortable;