//遍历每一列,禁用排序               

for (int i = 0; i < dgvDemo.Columns.Count; i++)
                    dgvDemo.Columns[i].SortMode = DataGridViewColumnSortMode.NotSortable;

posted on 2009-06-02 12:23  新郎  阅读(132)  评论(0编辑  收藏  举报