Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Why listview cannot received the OnDragDrop event.

Why listview cannot received the OnDragDrop event.

Scheduled Pinned Locked Moved C#
tutorialquestion
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Fired Fish Gmail
    wrote on last edited by
    #1

    Two listview are placed on the form. Then select one item in listviewA and draw it to lsitviewB , why the listViewB cannot get the OnDragDrop event. Does any other configure need to set ? when debuging, how to see all the message in this form?

    N 1 Reply Last reply
    0
    • F Fired Fish Gmail

      Two listview are placed on the form. Then select one item in listviewA and draw it to lsitviewB , why the listViewB cannot get the OnDragDrop event. Does any other configure need to set ? when debuging, how to see all the message in this form?

      N Offline
      N Offline
      Nuri Ismail
      wrote on last edited by
      #2

      AllowDrop option in the properties for the listView control must be set to True. Regards, Nuri Ismail

      F 1 Reply Last reply
      0
      • N Nuri Ismail

        AllowDrop option in the properties for the listView control must be set to True. Regards, Nuri Ismail

        F Offline
        F Offline
        Fired Fish Gmail
        wrote on last edited by
        #3

        The AllowDrop value has been setten to true, but the program still cannot get the DragDrop message. But the DragEnter message can be received.

        N 1 Reply Last reply
        0
        • F Fired Fish Gmail

          The AllowDrop value has been setten to true, but the program still cannot get the DragDrop message. But the DragEnter message can be received.

          N Offline
          N Offline
          Nuri Ismail
          wrote on last edited by
          #4

          Fired.Fish.Gmail wrote:

          the program still cannot get the DragDrop message.

          First you have to check if you correctly set the DragDrop event handler. It's very hard to guess where is the problem without a code fragment. You can compare your code with some examples which demonstrate the Drag and Drop concept. --> Here[^] is an example that implements exactly the Drag and Drop operations between 2 ListViews. --> Here[^] in the example part of this documentation you will find a brief explanation of Drag and Drop concept. The provided example is about drag and drop implementation between 2 ListBox controls. I hope this helps. :) Regards Nuri Ismail

          F 1 Reply Last reply
          0
          • N Nuri Ismail

            Fired.Fish.Gmail wrote:

            the program still cannot get the DragDrop message.

            First you have to check if you correctly set the DragDrop event handler. It's very hard to guess where is the problem without a code fragment. You can compare your code with some examples which demonstrate the Drag and Drop concept. --> Here[^] is an example that implements exactly the Drag and Drop operations between 2 ListViews. --> Here[^] in the example part of this documentation you will find a brief explanation of Drag and Drop concept. The provided example is about drag and drop implementation between 2 ListBox controls. I hope this helps. :) Regards Nuri Ismail

            F Offline
            F Offline
            Fired Fish Gmail
            wrote on last edited by
            #5

            Thanks Nuri I know that can not receive the DragDrop event because in the DragOver event, the e.Effect was set as Link. But the AllowEffect is ALL(Copy|Move) so the DragDrop event cannot do.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups