for (int i = 0; i < dgvDemo.Columns.Count; i++)
dgvDemo.Columns[i].SortMode = DataGridViewColumnSortMode.NotSortable;
datagridview 积累
//遍历每一列,禁用排序