Open the popup for splitbutton when clicked

3 posts, 0 answers
  1. Shawn
    Shawn avatar
    66 posts
    Member since:
    Jun 2014

    Posted 15 May 2019 Link to this post

    Hello,

    Is there a way to open the toolbar's splitbutton popup to show the items when the splitbutton itself is clicked instead of the little arrow?

    Thanks,

    Shawn A.

  2. Shawn
    Shawn avatar
    66 posts
    Member since:
    Jun 2014

    Posted 15 May 2019 in reply to Shawn Link to this post

    I think I managed to figure it out via this link https://www.telerik.com/forums/open-split-button-with-js

    Here's the code I came up with, which is very close to the one in the link above, for anyone who's interested:

    function onClick(e) {
        var element = e.target.closest(".k-split-button");
        if (element) {
            var popup = element.data("kendoPopup");
            if (popup) {
                popup.open();
            }
        }
    }

     

    Thanks,

    Shawn A. 

  3. Dimitar
    Admin
    Dimitar avatar
    761 posts

    Posted 20 May 2019 Link to this post

    Hi Shawn,

    You are indeed correct that the Toolbar's click event could be used to determine if the SplitButton wrapper is clicked, and then open its popup. I think that this is a good example that could be added in the Knowledge Base section in the documentation, thus I have added a task to our backlog for creating the resource.

    Regards,
    Dimitar
    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