Drop event dataItem issue - Tree View

2 posts, 0 answers
  1. Catalin
    Catalin avatar
    1 posts
    Member since:
    Jun 2015

    Posted 14 Mar Link to this post



    I`m having a bit of a problem, I have set up a tree view, everything get's loaded properly. The problem that I am facing is that I cannot for some reason access the source and target data items.

    The thing that baffles me is that on the select using e.node event I`m getting the proper data: 

    {_events: Object, _handlers: Object, _id: "56e687375f800af840a30683", name: "5", tenantId: "56bdcc6c3a0328620c306d72"…}
    _childrenOptions: Object
    _events: Object
    _handlers: Object
    _id: "56e687375f800af840a30683"
    _loaded: false
    address: me.extend.init
    assets: me.extend.init[0]
    attrs: me.extend.init[0]
    childNodes: me.extend.init[0]
    dirty: false
    hasChildren: false
    id: "56e687375f800af840a30683"
    index: 1
    name: "5"
    parent: ()
    parentId: "56e687305f800af840a30681"
    path: "1/3/5"
    tenantId: "56bdcc6c3a0328620c306d72"
    uid: "a8b4032a-db93-452c-a622-3fe93a5b4ab4"

    But in the drop using the same thing on e.destinationNode or e.targetNode I get something like this 

    o {_events: Object, _handlers: Object, _loaded: true, text: "↵ ↵ 5↵", uid: "9030564d-9f42-491c-8824-21983e3cbe04"…}
    _childrenOptions: Object
    _events: Object
    _handlers: Object
    _loaded: true
    children: J.extend.init
    dirty: false
    expanded: false
    hasChildren: false
    id: ""
    items: me.extend.init[0]
    parent: ()
    text: "↵ ↵ 5↵"
    uid: "9030564d-9f42-491c-8824-21983e3cbe04"
    __proto__: i

    In both cases I`m using: 




         dataSource: schema,
         dataTextField: "name",
         dragAndDrop: true,
         drag: drag,
         drop: drop,
         select: select,
         dataBound: onDataBound,
         template :kendo.template($("#treeview-template").html())


    var schema = new kendo.data.HierarchicalDataSource({
        transport: {
          read: function (options) {
            // ajax request
        schema: {
          model: {
            id: "_id",
            hasChildren: "hasLocations",
            children: "chd"


  2. Alex Gyoshev
    Alex Gyoshev avatar
    2497 posts

    Posted 17 Mar Link to this post

    Hello Catalin,

    Can you please provide a Dojo snippet that reproduces the problem, along with some context? What are the drop / dragend handlers?

    Alex Gyoshev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top