This is a migrated thread and some comments may be shown as answers.

Open the popup for splitbutton when clicked

2 Answers 335 Views
Toolbar
This is a migrated thread and some comments may be shown as answers.
Shawn
Top achievements
Rank 1
Shawn asked on 15 May 2019, 01:30 PM

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 Answers, 1 is accepted

Sort by
0
Shawn
Top achievements
Rank 1
answered on 15 May 2019, 02:13 PM

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. 

0
Dimitar
Telerik team
answered on 20 May 2019, 05:45 AM
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.
Tags
Toolbar
Asked by
Shawn
Top achievements
Rank 1
Answers by
Shawn
Top achievements
Rank 1
Dimitar
Telerik team
Share this question
or