开发者

C# 3.5 datagridview column header click does not sorts

开发者 https://www.devze.com 2023-04-05 15:33 出处:网络
I have winform there开发者_JS百科 is datagridview control when i click on column header it does not sorts.

I have winform there开发者_JS百科 is datagridview control when i click on column header it does not sorts. Can anyone advice me whats wrong?


Each column has "SortMode" property in datagridview control. SortMode Values : Automatic, NotSortable, Programmatic You could check SortMode property.


 private void dataGridView1_ColumnAdded(object sender, DataGridViewColumnEventArgs e)
        {
            e.Column.SortMode = DataGridViewColumnSortMode.NotSortable;
        }
0

精彩评论

暂无评论...
验证码 换一张
取 消