Irakli Lekishvili
Irakli Lekishvili

Reputation: 34158

C# 3.5 datagridview column header click does not sorts

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

Upvotes: 0

Views: 1481

Answers (2)

Nitesh Srivastava
Nitesh Srivastava

Reputation: 1

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

Upvotes: 0

mtaskopru
mtaskopru

Reputation: 139

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

Upvotes: 2

Related Questions