Integrated with Sortable

2 posts, 0 answers
  1. Jawad
    Jawad avatar
    1 posts
    Member since:
    Dec 2017

    Posted 05 Nov 2018 Link to this post

    hello,

    i'm trying to Integrate kendoDraggable with kendoSortable (inside ListView)

    here is an example : https://dojo.telerik.com/iZOfuNoW

     

    i want to drag a button and drop it inside Sortable ListView 

  2. Tsvetina
    Admin
    Tsvetina avatar
    2481 posts

    Posted 07 Nov 2018 Link to this post

    Hi Jawad,

    The main thing that is missing is the DropTarget declaration. Without it, buttons cannot actually be dropped at a given location. I instantiated drop targets from the ListView elements:
    $("#listView .product").kendoDropTarget({
      drop: function(e){
        e.dropTarget.append(e.draggable.element);
      }
    });

    You can see the full modified example here:
    https://dojo.telerik.com/iZOfuNoW/2

    Click the buttons to see how they detect if they are already dropped in the ListView.

    Regards,
    Tsvetina
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top