New to Kendo UI for jQuery? Download free 30-day trial

Close the ToolBar Popup Manually

Environment

Product Progress Kendo UI ToolBar for jQuery
Operating System Windows 10 64bit
Visual Studio version Visual Studio 2017
Preferred Language JavaScript

Description

How can I manually close the popup of a Kendo UI for jQuery ToolBar?

Solution

The example below demonstrates how to close the ToolBar popup from a button click event in a template.

   <div id="toolbar"></div>
    </div>

  <script>
    function action() {
      $("#toolbar").data("kendoToolBar").popup.close();
    }

    $("#toolbar").kendoToolBar({
      items: [
        { type: "button", text: "Button" },
        {
          template:"<a class='k-item k-state-default ng-scope' >Test</a>",
          overflowTemplate:"<button onclick='action()' class='btn' >Test</button>",
          overflow: "always"
        }
      ]
    });
  </script>

See Also

In this article