views:

156

answers:

1

I have a windows form that contains two usercontrols. One usercontrol contains two list views. The other usercontrol has a grid.

Within the first usercontrol the two list views drag and drop their contents between each other.

The grid usercontrol is setup to dragdrop onto the listview usercontrol.

The problem is that the drag drop event within the listview usercontrol always takes precedence over the dragdrop between the two usercontrols.

So if I drag from the grid usercontrol over the listview usercontrol it will execute the internal dragdrop event of the listview control.

In other words it fires this event

lv_groupActivites_DragDrop

instead of

reservationScheduleBooking1_DragDrop

Is there anyway of specifying which drag drop event should be fired?

+1  A: 

You are dragging from the grid in one user control and trying to drop onto a specific listview on the other user control or anywhere on the other user control?

If you want to drop anywhere on the other user control, I think you will need to setup the apprporate event handler on that user control to respond. If you want to drop on to a specific listview that also accepts drag events from the other listview you will need to do extra work in your event handler on that listview to figure out where the drag initiated from.

Scott Dorman