You can't use a manual width and autofit on the same column: autofit automatically resizes the column to fit the data.
Autosize will override any width you try to set.
Quote:
OKFirst option is : DGV.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells
Second Option is :.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.None
so i want use first and second options both,
when i open form i will see datargridview columns are autofit,
But same time, i should change columns width manuel,
That's a problem: What you are asking for is that the DGV initially fits all the data, but that the columns can later be resized.
You could wait for it to be completely shown, then change the AutoSizeColumnsMode to DataGridViewAutoSizeColumnsMode.None
But ... that will "undo" the widths for all columns, so you'd have to get them first, change the option, then set them back:
Dim cols As List(Of Integer) = New List(Of Integer)()
For Each col As DataGridViewColumn In myDataGridView.Columns
cols.Add(col.Width)
Next
myDataGridView.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.None
Dim i As Integer = 0
For Each col As DataGridViewColumn In myDataGridView.Columns
col.Width = cols(i)
i = i + 1
Next