TreeView item with url property won't drag/drop

4 posts, 0 answers
  1. Eric
    Eric avatar
    3 posts
    Member since:
    Jan 2017

    Posted 02 Feb Link to this post

    If I remove the url property on the data item, behavior is normal.

    I've got a jsFiddle that demonstrates the problem here. The last node, 'Carpets' has a url property and can't be dropped and won't fire the drag event.

  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    916 posts

    Posted 06 Feb Link to this post

    Hello Eric,

    Currently the Drag and Drop functionality does not work for TreeView nodes that are set to navigate on click. As a workaround, you could consider using a conditional template, which will display a link if the node's purpose is to navigate and only its text if it is not. This way clicking on the link itself will navigate, but the node can still be dragged/dropped if you click on the span element that holds the anchor. Here's a sample dojo that demonstrates this approach. Note that I applied a CSS rule that makes the span element mentioned above wider so that it is easier to click on it (instead of on the link it wraps) and drag it.

    Regards,
    Ivan Danchev
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Eric
    Eric avatar
    3 posts
    Member since:
    Jan 2017

    Posted 06 Feb in reply to Ivan Danchev Link to this post

    Thanks Ivan. That work great.
  4. Ivan Danchev
    Admin
    Ivan Danchev avatar
    916 posts

    Posted 08 Feb Link to this post

    Hello Eric,

    Thank you for getting back to us. I am glad the suggested approach that uses templates worked out.

    Regards,
    Ivan Danchev
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top