Double click or multi-select option

6 posts, 0 answers
  1. Eric
    Eric avatar
    3 posts
    Member since:
    Sep 2017

    Posted 07 Sep Link to this post

    Is it possible to move item from one list to another just by double clicking on an item? I could not find this in the documentation and I'm not sure if it is supported. If it is not supported, would it be possible to add a checkbox before each item (via template) so that once the move button is clicked all the checked item will be moved?
  2. Joana
    Admin
    Joana avatar
    126 posts

    Posted 11 Sep Link to this post

    Hello Eric,

    You could bind the double click handler via jQuery. Here is an example how it should look like and you could modify the selectors: 

    $(".k-list").on("dblclick", ".k-item", function(){
        alert("Clicked");
    });

    You could add checkbox to the ListBox items via template. Have a look at our demo regarding the usage of templates: https://demos.telerik.com/kendo-ui/listbox/templates.


    Regards,
    Joana
    Progress Telerik
    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.
  3. Eric
    Eric avatar
    3 posts
    Member since:
    Sep 2017

    Posted 12 Sep in reply to Joana Link to this post

    Hi Joana,

     

    Thanks for your reply. How can I trigger the move event from one list box to another instead of the alert?

     

    Thanks.

  4. Joana
    Admin
    Joana avatar
    126 posts

    Posted 13 Sep Link to this post

    Hello Eric,

    I have prepared a dojo sample illustrating how to execute command in the ListBox on double click:

    http://dojo.telerik.com/@jivanova/EtEzOz

    You could use the _executeCommand method of the widget to transfer the items on double click.

    Regards,
    Joana
    Progress Telerik
    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.
  5. Eric
    Eric avatar
    3 posts
    Member since:
    Sep 2017

    Posted 13 Sep in reply to Joana Link to this post

    Thanks again for your reply. The example works and I managed to do it both ways, however, how can this be replicated on ASP.NET MVC?
  6. Joana
    Admin
    Joana avatar
    126 posts

    Posted 15 Sep Link to this post

    Hello Eric,

    The same logic could be applied in ASP.NET MVC scenario. Once you have initialized the widget, you could take its reference in the client-side and the code will look like:

    $("#listBox").data("kendoListBox").wrapper.find(".k-list").on("dblclick", ".k-item", function(e){
       listBoxA._executeCommand("transferTo");
    });


    Regards,
    Joana
    Progress Telerik
    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