Treeview Drag & Drop with constraint

2 posts, 1 answers
  1. Sang
    Sang avatar
    25 posts
    Member since:
    Oct 2011

    Posted 09 Aug 2012 Link to this post

    Hi Expert,
    We are looking to use the Treeview Drag & Drop but would like to add some constraint, I am wondering if the current Kendo UI support what we're try to accomlish.
    • Can we limit the child level of the parent tree?  We want to only allow 1 child per parent?
    • Can we restrict user from creating the Top Level? 

    We we try to accomplish is that we have a static list from the left hand side and we have 2 static parent on the right.  User must drag fromof the parent from the left.  The only condition is each of the level can only have 1 child node.
    It cannot be where C&D is a child of B.  Can we prevent this?  TIA

    Kendow UI Tree View 

  2. Answer
    Alex Gyoshev
    Alex Gyoshev avatar
    2497 posts

    Posted 10 Aug 2012 Link to this post

    Hello Sang,

    You can enforce these drag&drop constraints by handling the treeview drag&drop events, dragstart / drag / dropdragend. See the example code for the drag event for more information.

    All the best,
    Alex Gyoshev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET AJAX banner
Back to Top