0

Hi friends,
I have datagridview.
When i click on headerrow of that datagridview.All rows set in ascending order by clicked column.But i don't want to ascending this. which property i should use???
I tried to find but no solution.
Anyone plz help me.......

Thanks in advance.

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by Oxiegen
0

There is no direct access to disable column sorting in the datagridview.
But you can try this:

For Each dgvCol As DataGridViewColumn In Me.DataGridView1.Columns
    dgvCol.SortMode = DataGridViewColumnSortMode.NotSortable
Next
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.