Add item to splitbutton in toolbar

2 posts, 0 answers
  1. Owen
    Owen avatar
    2 posts
    Member since:
    Oct 2014

    Posted 18 May 2015 Link to this post

    I can't seem to find any examples of adding a menu item to a splitbutton in a toolbar.  

    Here is the code I have for the splitbutton:

                items: [
                        type: "splitButton",
                        text: "Select",
                        id: "selectButton",
                        click: selectButtonClickHandler,
                        menuButtons: [
                            { text: "foo1" },
                            { text: "foo2" }


    I'm trying to do something like $("#selectButton").add(new menuButton("foo3"));

    Is there a way to do this?  How have I missed it in the documentation?

  2. Iliana Nikolova
    Iliana Nikolova avatar
    2622 posts

    Posted 20 May 2015 Link to this post

    Hi Owen,

    There is no official API method for this requirement. What I would suggest as a workaround is to use jQuery append method and manually add a new item to the list: 

    $("#selectButton_optionlist").append("<li><a class='k-button'>Foo3</a></li>");

    Iliana Nikolova
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top