This project is read-only.

Drag and Drop

Apr 27, 2008 at 9:54 PM
Is it possible to automate drag and drop operations in a ListView? I couldn't find a way to do it..


Apr 27, 2008 at 10:38 PM
OK, I made it work.

I was trying to automate a drag and drop operation inside a ListView. I had to change the ListView so it has FullRowSelect = true and MultiSelect = False.

With the current Drag and Drop implementation, the Mouse.LeftUp() was not clicking in the Listview area that had text in it, so it was not selecting the row. With FullRowSelect = true that was fixed.

After LeftUp()., when the mouse was moved to the new position, it selected all the ListView items. With MultiSelect = false, that was fixed.
Apr 28, 2008 at 8:29 AM
>>I had to change the ListView so it has FullRowSelect = true and MultiSelect = False.
Can you tell me if drag and drop was working manually before you did this?
Nov 19, 2010 at 1:04 PM

hallo, aaguiar,

can you tell me, how can you set FullRowSelect=true and MultiSelect=False.

I have not found these two attributes in ListView.

Thanks. For my programm, there is also a problem, after selecting a dragged ListViewRow, the fouse of dropped ListViewRow is lost.

Nov 23, 2010 at 9:46 AM

This is a change in the application not in test

 property for Windows.Forms.ListView



Nov 23, 2010 at 10:15 AM
Edited Nov 23, 2010 at 10:15 AM

Thanks, Throndorin,

but do you know, how to test the list view with White.

Because of selecting problem, I have not implemented this test successfully.


Nov 24, 2010 at 7:02 AM

Have you tried row.Select before using drag and drop?

we have written our own drag and drop before I start to complete the tests and  I never changed to White and don't know why we not use White Drag and drop. 

does drag and drop work manually?

Nov 24, 2010 at 9:04 AM

Thanks. Throndorin,

I have tried White Drag and Drop, but it doesn't work in ListView. I have tried many different situations, e.g. only select the dragged listviewrow,

or only select the dropp listviewrow, or both are selected. But it doesn't work. If one listviewrow is selected, the focuse is on this listviewrow, the

before selected listviewrow can not be selected, so I hope to solve this problem.

I don't know whether you have implemented Drag&Drop successfully. But for me, there is also something unstable between my treeNode drag&drop

But there is no problem by both manuell test.