How To: Drag and Drop tree node onto an IFRAME

12 posts, 0 answers
  1. Martin
    Martin avatar
    39 posts
    Member since:
    Jan 2007

    Posted 27 Feb 2008 Link to this post

    Is it possible to drag and drop a tree onto an IFRAME? I have tried, but as soon as you drag over the IFRAME the dragged item disapears.

    If it is not possible with Telerik is there some sample code that would allow me to do this from a tree control
  2. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 28 Feb 2008 Link to this post

    Hello Martin,

    It possible to implement a similar drag and drop mechanism which could be described as follows:
    • Drag and Drop a Node on a designated area, let say an image;
    • Call a function which resides in the iframe and pass any required values to it (there you could have another Tree View and create a duplicate node with the given values).
    Please, find attached a sample implementation of this approach.

    Kind regards,
    Simon
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Martin
    Martin avatar
    39 posts
    Member since:
    Jan 2007

    Posted 03 Mar 2008 Link to this post

    Thank you for your response. This does not really help me unfortunately as the drop zone will have to be over a IFrame or ActiveX control.

    It would be nice if I could attach the standard ondragstart, ondragend, etc. events as these seem to work when going over an IFrame or an ActiveX control when I use a standard <img>.

    I'll have to try and find a different workaround.

  5. Martin
    Martin avatar
    39 posts
    Member since:
    Jan 2007

    Posted 21 Jul 2008 Link to this post

    Hi,

    I was wondering if there was any progress in finding a solution to this. In brief, I have a Telerik tree control and an activeX control. If I drag a tree node over the activeX control I do not get the client side onNodeDropping handler to fire. I know the code is fine as without the activeX control my code works. I have tried various things including this....

    function onNodeDragStart(sender, args)  
     
    {  
     
    var img = args.get_node()._imageElement;  
     
    img.attachEvent("ondragend", dragended);  
     
    }  
     
     


    Dragging a standard <img> element over the activeX control works OK if I handle the ondragend event. Is there anyway I can somehow incorporate this into a 'hacked' solution?

    Thanks,
    Martin

  6. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 21 Jul 2008 Link to this post

    Hi Martin,

    RadTreeView currently does not support dragging and dropping of nodes over ActiveX controls. Unfortunately we have not tested any workarounds as this is not a common request. If this is capability is vital for your application I suggest you open a support ticket and send us a sample project including the ActiveX control you are currently using.

    Regards,
    Albert
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  7. Martin
    Martin avatar
    39 posts
    Member since:
    Jan 2007

    Posted 28 Jul 2008 Link to this post

    I have managed to hack myself around the problem. I set a global variable (I know it already sounds bad!) in the OnClientNodeDragStart. I then attach to the mouse up event of the activeX control. Within the mouseUp I check the global variable has been set and then treat it as if a drag/drop operation has occurred.

    However, I need to cancel the Telerik drag drop operation. Is there a way to do this. I think there is a set_cancel or something like that, but it is a little hard to know what to call this on.

    Any help will be appreciated.
    Thanks,
    Martin
  8. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 28 Jul 2008 Link to this post

    Hello Martin,

    You can use the nodeDropping event to cancel the drag and drop. However I am not sure if it will be called at all when using ActiveX control.

    Regards,
    Albert
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  9. mirang
    mirang avatar
    115 posts
    Member since:
    Aug 2010

    Posted 09 Feb 2012 Link to this post

    Is it possible for a radtreeview inside iframe to perform drag and drop on controls  which are outside that iframe ?
  10. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 10 Feb 2012 Link to this post

    Hi mirang,

    RadTreeView does not support this out-of-the-box. You need some custom code to do this. Here is an example.

    I hope this helps.

    All the best,
    Simon
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  11. Mirang
    Mirang avatar
    6 posts
    Member since:
    Jun 2012

    Posted 06 Sep 2012 Link to this post

    Is the sample developed using telerik controls ?
  12. Shilpa
    Shilpa avatar
    29 posts
    Member since:
    Apr 2015

    Posted 16 May Link to this post

    Hi Telerik Team,

     

    Do we now have any possibility of dragging a node to drop zone over a Rad Pane ContentURL (Iframe).

  13. Shilpa
    Shilpa avatar
    29 posts
    Member since:
    Apr 2015

    Posted 16 May Link to this post

    Hi Team,

     

    Please respond on this, I need it urgently.

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017