This is a migrated thread and some comments may be shown as answers.

Drag from TreeView with Custom Hint

1 Answer 290 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Adam
Top achievements
Rank 1
Adam asked on 13 Jun 2013, 11:26 PM
I would like to show a custom html hint when dragging items from a treeview, but I cannot figure out how to get it to work.  Is there a way to use kendoDraggable with treeview to make this happen?

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 17 Jun 2013, 08:18 AM
Hi Adam,

You can modify the drag hint template with the following code, right after the initialization of the widget.
$("#treeview-left").kendoTreeView({
    dragAndDrop: true,
    //....
})
.data("kendoTreeView")
.templates
.dragClue = kendo.template("<div class='k-header k-drag-clue'><span class='k-icon k-drag-status' />#: data.item.text #</div>");

It is possible to change the content of the hint (#: data.item.text #) but you would have to keep the .k-drag-status icon. Removing the icon span will cause a JavaScript error.

I hope the information will help.

Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
TreeView
Asked by
Adam
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or