Setting a filter causes treeview to lose important dom attributes

2 posts, 0 answers
  1. Ryan
    Ryan avatar
    27 posts
    Member since:
    Jan 2013

    Posted 13 Oct 2014 Link to this post

    I have a treeview and implement drag and drop. I noticed that when I set a filter on the datasource, the treeview loses attributes like:


    And the drag and drop stops working.

    See this dojo for an example. Examine the dom to see the attributes are there on the first tree node. Click the "Set Filter" button, and observe the attributes are gone.

    This seems like a bug.. Maybe I'm doing something wrong here?

  2. Alex Gyoshev
    Alex Gyoshev avatar
    2515 posts

    Posted 14 Oct 2014 Link to this post

    Hello Ryan,

    Instantiating widgets in the TreeView is not supported. If you need to work with Drag&Drop in the TreeView, use the dragAndDrop configuration option. You can restrict which items are draggable via a dragstart event handler (see the third example). Any modifications to the DataSource will re-render the TreeView, by design, and remove any custom attributes.

    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