Drag an item of Listview to another position of the same ListView 
Author Message
 Drag an item of Listview to another position of the same ListView

Hello,

I move the selected item in listview through lsv.ItemDrag and and then get
it by handling lsv.DragDrop.

e.g.
'=================================
Private Sub lsvImageFile_DragDrop(ByVal sender As Object, ByVal e As
System.Windows.Forms.DragEventArgs) Handles lsvImageFile.DragDrop

        Dim item As MyListViewItem
        item = e.Data.GetData(GetType(MyListViewItem))

        lsvImageFile.Items.Remove(item)
        lsvImageFile.Items.Add(item)

End Sub
'-----------------------------------------------------

It can work, by cannot add the item to position where the mouse left click
is released in the listview. It now must add to the bottom of the listview.

However can I move to a specific position (e.g. second row) of the listview?

Thank you!
Jason



Tue, 30 Aug 2005 23:03:42 GMT  
 Drag an item of Listview to another position of the same ListView
Hello Jason,


Quote:
> I move the selected item in listview through lsv.ItemDrag and and then
get
> it by handling lsv.DragDrop.

http://www.ilypsys-systems.co.uk/ils1controls.zip

Regards,
Herfried K. Wagner



Wed, 31 Aug 2005 00:34:25 GMT  
 Drag an item of Listview to another position of the same ListView
Hello,

Thank you for your reply first.

I 've tried the application, but i cannot see there is the function for
moving an item of a listview to another position of the same listview.

Can u kindly tell we where I can see this from the sample application?
Thank you!!

Rgds,
Jason Ho



Quote:
> Hello Jason,


> > I move the selected item in listview through lsv.ItemDrag and and then
> get
> > it by handling lsv.DragDrop.

> http://www.ilypsys-systems.co.uk/ils1controls.zip

> Regards,
> Herfried K. Wagner



Wed, 31 Aug 2005 18:24:44 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Dragging from ListView to ListView or TreeView

2. Dragging from ListView to ListView or TreeView

3. ListView: How to get item position?

4. ListView Item position

5. ListView: How to get item position

6. Position Selected Item in a ListView at the top

7. How to get position of ListView item??

8. Dragging the listview item

9. drag listview items

10. Seeking advice for dragging a ListView Item

11. ListView - Dragging Items to Rearrange Rows

12. Disable dragging ListView items

 

 
Powered by phpBB® Forum Software