Treelist drag and drop behave like treeview?

6 posts, 0 answers
  1. Nayana
    Nayana avatar
    12 posts
    Member since:
    Sep 2015

    Posted 08 Dec 2016 Link to this post

    Hello,

     

    Is there a way i can override default tree list drag and drop event? 

    I would need similar functionality as tree view where i can order the rows and insert before or after any row.

    Any help would be appreciated.

     

     

    Thanks in advance!

  2. Alexander Popov
    Admin
    Alexander Popov avatar
    1434 posts

    Posted 12 Dec 2016 Link to this post

    Hi Nayana,

    The TreeList widget does not support reordering out of the box. The behavior you are after could be implemented though, by subscribing to the widget's drag and drop events and doing the reordering manually if the conditions are met. 

    Regards,
    Alexander Popov
    Telerik by Progress
    Kendo UI is ready for Visual Studio 2017 RC! Learn more.
  3. Nayana
    Nayana avatar
    12 posts
    Member since:
    Sep 2015

    Posted 12 Dec 2016 in reply to Alexander Popov Link to this post

    Hello,

    Thanks for the reply.

    In Treeview, there is a property called "dropPosition" which i can set in drop / dragend event.

    In TreeList, there is a property called "position" which i can set in drop / dragend event. It is not having any impact on setting the position property to value "before" / "after".

     

    Can you please help me with a code snippet on how i can achieve the same in tree list?

     

     

    Thanks in advance!

  4. Nayana
    Nayana avatar
    12 posts
    Member since:
    Sep 2015

    Posted 13 Dec 2016 in reply to Alexander Popov Link to this post

    Hello,

    Thanks for the reply.

    In Tree view, the dragend and drop event have a property called "dropPosition".
    Where as in tree list, the same events have a property called "position". I tried setting the position value to "before" / "after". It has no impact.

    Can you please help me with the code snippet on how i can achieve the same in tree list?

    I also see, there is a cue line in tree view, when i drag rows. They indicate the position where i can insert the dragged row. How can i have the same cue line in tree list?

    Attached is the snapshot of the line in tree view. 





  5. Nayana
    Nayana avatar
    12 posts
    Member since:
    Sep 2015

    Posted 13 Dec 2016 in reply to Alexander Popov Link to this post

    Hello,

    Thanks for the reply.

    In Tree view, the dragend and drop event have a property called "dropPosition".
    Where as in tree list, the same events have a property called "position". I tried setting the position value to "before" / "after". It has no impact.

    Can you please help me with the code snippet on how i can achieve the same in tree list?

    I also see, there is a cue line in tree view, when i drag rows. They indicate the position where i can insert the dragged row. How can i have the same cue line in tree list?

    Attached is the snapshot of the line.




  6. Alexander Popov
    Admin
    Alexander Popov avatar
    1434 posts

    Posted 14 Dec 2016 Link to this post

    Hello,

    As mentioned previously, reordering is not supported out of the box. This means that deciding how and when to show the cue and the before/after cursor icons should be part of the custom implementation. Changing the order of the items can be achieved using the DataSource's API methods.

    Regards,
    Alexander Popov
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top