ItemDrag not recognizing the correct dragNode

6 posts, 0 answers
  1. Claus
    Claus avatar
    6 posts
    Member since:
    Jun 2009

    Posted 22 Jun 2009 Link to this post

    Running your demos for Drag and Drop in the TreeView leaves me puzzled...

    When dragging the "Unread Mail" node in the left treeView and then dropping it on the "Inbox" node the textBox on the right ("radTextBox1") displays the previous sibling node "Large Mail". It is also "Large Mail" that is displayed during the actual dragging.

    What am I missing here? I really need the correct node as I have a corresponding XML document thet I need to manipulate based on drag and drop in the treeView.

    <update>
    Just tried running the same code on a couple of other pc's and they are working just fine. The problem is consistent on my own pc though. Any ideas as to what might be wrong?
    </update>

    Thanks in advance

    Claus
  2. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 22 Jun 2009 Link to this post

    Hello Claus,

    I am afraid that I could not reproduce the issue. I will need further details on how to create the wrong drag & drop behavior. By default, everything works fine here, I am using Q1 SP1 Demo Application. I am looking forward to your reply.

    All the best,
    Victor
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Jean-Philippe Pagé
    Jean-Philippe Pagé avatar
    7 posts
    Member since:
    Aug 2009

    Posted 25 Aug 2009 Link to this post

    I am having the same problem as the original poster.  I am using the Q2 SP1 2009 demo controls.  I noticed that if I click on the node and then click on it a second time to initiate the drag it works correctly.  If I have a node selected, then I click on another node and start dragging that node immediatly then the wrong node is received in the ItemDrag eventargs.  I have opened a ticket with this same issue and I have attached to it a sample application to reproduce this problem but since we can't attach files here I will put the body of the application in code tag....
    public Form1()  
            {  
                InitializeComponent();  
     
                for(int x = 0; x < 10; x++)  
                {  
                    RadTreeNode newRadNode = new RadTreeNode("Item " + x.ToString());  
                    radTreeView1.Nodes.Add(newRadNode);  
                }  
            }  
     
            private void radTreeView1_ItemDrag(object sender, RadTreeViewEventArgs e)  
            {  
                MessageBox.Show(e.Node.Text);  
            } 

    I have simply created a standard C# windows form app into which I have added a RadTreeview with the default name. 


    ***edit***
    As a workaround to this issue, I've found that if I keep and use the node being passed to the eventargs of the Selecting event then I have the right node.
  5. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 28 Aug 2009 Link to this post

    Hello Jean-Philippe Pagé,

    Thank you for the detailed explanation, I see the issue and I confirm that it is a bug in RadTreeView.
    Thank you for your feedback, this will be addressed in a future release.

    Sincerely yours,
    Victor
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. Anthony Jackson
    Anthony Jackson avatar
    4 posts
    Member since:
    Oct 2009

    Posted 24 Mar 2010 Link to this post

    I am seeing the same issue in my project, has this bug been addressed yet?
  7. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 25 Mar 2010 Link to this post

    Hello Anthony Jackson,

    The issue is fixed in the Q1 2010 release. You can download the new release and use the demo application with the examples to test it.
     

    Regards,
    Victor
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top
UI for WinForms is Visual Studio 2017 Ready