0

Dear fellows,

i have a problem here, is there anyway to implement the drag and drop function for users to reorder the column sequence? i have tried several ways but it still not working, any hints can enlighten me? bottom is part of my code, thanks in advance.

DataGridView1.AllowUserToOrderColumns = True
        DataGridView1.SelectionMode = DataGridViewSelectionMode.FullColumnSelect
Private Sub DataGridView2_DragOver(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles DataGridView2.DragOver
        'Just to Show a mouse icon to denote drop is allowed here
        e.Effect = DragDropEffects.Move
    End Sub
3
Contributors
3
Replies
7
Views
7 Years
Discussion Span
Last Post by Mukesh_3
0

i have read this both url before i have posted. but it doesnt work when i converting it from C# to vb.net. anyway thanks for your reply =)

0

Replace this line
DataGridView1.SelectionMode = DataGridViewSelectionMode.FullColumnSelect

with
DataGridView1.SelectionMode = DataGridViewSelectionMode.CellSelect

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.