I have a DataGridView with the datasource set to a binding source of data. My problem is I cannot get most of the columns to resize. Several of the columns don't show a resize cursor, while two others do: one can be resized, one cannot.
Here is what I have tried:
DGV.AllowUsertoResizeColumns = True
DGV.AutoSizeColumnMode = None
DGV.RowHeadersWidthSizeMode = EnableResizing
DGV.Dock = Fill
AutoSizeMode = NoneSet
and Resizable = True
dataGridView1.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.ColumnHeader)
(and other variations) after data has been loaded into the DGVHere's a screenshot of the properties of my DataGridView
:
Any Ideas?
Upon checking the individual column settings in the gridview, I found some cells still had
AutoSizeMode = AllCells
I changed this to:
AutoSizeMode = NotSet
and now I am able to resize all columns.