Drag & Drop Object From RadTreeview To Textbox

7 posts, 0 answers
  1. Derick
    Derick avatar
    2 posts
    Member since:
    Mar 2011

    Posted 19 Mar 2011 Link to this post

    This has probably been asked / answer previously - I couldn't find what I was looking for in my searches, though.

    I've got a WPF RadTreeView set up, on WPF 4, with the last 2010 release of the Telerik WPF 4 controls. I've enabled drag & drop within my Treeview, and I am able to correctly drag the selected object (an "Equipment" class) within my treeview.

    I've looked at the sample apps that show how to drag an item from a RadTreeview to a Textbox and set up everything correctly, according to the sample. Dragging a basic piece of text, like the example shows, works. However, dragging my Equipment class from the treeview to the Textbox (a standard WPF textbox) does not work. It constantly tells me that the drop is not allowed, even though I've implemented the DragQuery event and set e.QueryResults = true

    any tips, tricks, or tutorials to help me get my situation working?
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 23 Mar 2011 Link to this post

    Hello Derick,

    I prepared a sample for you that is similar to the demo but the tree is now bound to a collection. Please examine it and let me know if it fits in your scenario.

    Regards,
    Petar Mladenov
    the Telerik team
  3. UI for WPF is Visual Studio 2017 Ready
  4. Derick
    Derick avatar
    2 posts
    Member since:
    Mar 2011

    Posted 30 Mar 2011 Link to this post

    Hi,

    the sample mostly works - i am able to drag and drop items successfully now. However, when I drag a treeview item over the textbox, the tooltip on the drag cue shows me that i am not able to drop the item. it shows the red circle with a line through it. in spite of this, i am still able to do the drop.

    is there a fix for this issue in a new release, possibly? I'm still working with the last 2010 release of the WPF controls.
  5. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 04 Apr 2011 Link to this post

    Hello Derick,

    This should be achieved with the RadDragAndDropmanager events dynamically. Could you please open a support ticket so that you can send us a runnable sample and we will investigate your scenario? If you can't, we can open a GeneralFeedBack support ticket so that you will be able to send projects.

    Greetings,
    Petar Mladenov
    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
  6. Erik
    Erik avatar
    43 posts
    Member since:
    Jan 2011

    Posted 25 Jan 2012 Link to this post

    <I got this working, so there's no need for follow up -- I just needed to follow the examples more closely.  :) >

    I am trying to do exactly the same thing as described in this post an cannot even get the attached demo to work.  It runs, but the text box is not accepting the drop.

    Here are a couple of notes:
    • The solution runs fine.
    • I am running the Q3 2011 WPF controls
    • I can drop into tree view just fine
    • The OnDropQuery and OnDropInfo events do not seem to be firing -- I put breakpoints on both functions and they never seem to get invoked.

    Also, one other question that I'm trying to get worked out -- if I am dragging into a text box that contains some existing text, can I somehow drag the new content (also text) in the middle of the existing text? 
    If not, cool, I'll just put it on the end and let the user move it from there.

  7. Zoltan
    Zoltan avatar
    7 posts
    Member since:
    Feb 2012

    Posted 12 Mar 2012 Link to this post

    Hi,

    I downloaded the attached example solution and the drag'n'drop doesn't seem to work for me. I'm using Telerik RadControls for WPF 2012 Q1.

    Erik: how did you manage to get the demo working?

    Thanks,
       Zoltan
  8. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 15 Mar 2012 Link to this post

    Hello Zoltan,

     In 2011 , we introduced some changes in the RadDragAndDropManager. We also introduced a new DND Framework - the DragDropManager. I re-factored the mentioned project to use the new DNDManager and you can see it uploaded in this code library project.

    Greetings,
    Petar Mladenov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top
UI for WPF is Visual Studio 2017 Ready