Treetable drag-n-drop grouping

edited December 2013 in Technical questions


i am trying to add a small functionality to the Treetable, i.e. i would like to be able to drag-n-drop siblingA upon siblingB and this should transform siblingB to a parent (with a plus-sign next to it), where siblingA becomes a child to it.

I couldn't find an easy way to do this till now. Could you please show me the right way?

Thanks a lot.


  • You can enable the desired behavior, by using code like next

    tree.attachEvent("onBeforeDrop", function(context){
          context.parent =;          //drop as child
          context.index = -1;               //as last child

    Unfortunately the case when you are transformin leaf item to the branch have a problem ( the above example doesn't work very well after new branch creating )

    To have the correct behavior you need to update the lib as well ( the same fix will be included in the next build )

  • the code you pasted was one of the first i tried and as in the snippet you sent, it had problems. but now with the new version of webix it works. thanks a lot!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!