Hello!
I have DGV perfectly fine, it is not bound to anything, populated programmatically, something like this:
![Name: 01.jpg
Views: 22
Size: 26.4 KB]()
Then I needed to disable Column Sorting when I click on any column header, so I inserted this code:
Then all the columns in my DGV are not in Autosize mode anymore:
![Name: 02.jpg
Views: 21
Size: 26.5 KB]()
The column sorting functionality is working fine now, but my Columns are not in Autosize mode anymore.
Is it possible to have both functionalities working?
I have DGV perfectly fine, it is not bound to anything, populated programmatically, something like this:
Then I needed to disable Column Sorting when I click on any column header, so I inserted this code:
VB.NET Code:
For Each dgvc As DataGridViewColumn In DataGridView1.Columns dgvc.SortMode = DataGridViewColumnSortMode.NotSortable Next
Then all the columns in my DGV are not in Autosize mode anymore:
The column sorting functionality is working fine now, but my Columns are not in Autosize mode anymore.
Is it possible to have both functionalities working?