I have a windows form application in which i have a datagridview with AllowUserToOrderColumns = true, then user change column order via drag and drop.
How can i know which column is dragged ?
I have a windows form application in which i have a datagridview with AllowUserToOrderColumns = true, then user change column order via drag and drop.
How can i know which column is dragged ?
When you set AllowUserToOrderColumns = true then you will know the column name in ColumnDisplayIndexChanged
Private Sub Datagridview1_ColumnDisplayIndexChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewColumnEventArgs) Handles dgvGuru.ColumnDisplayIndexChanged
MsgBox(e.Column.Name)
End Sub