Edit this page

Add Close Button inside Modal Windows

The example below demonstrates how to add a Close button to a modal Kendo UI Window.

    <div id="example">
      <div id="window">
        <button class="k-button close-button">Close</button>
      <button class="k-button open-button">Open window</button>

        $(document).ready(function() {
          var wnd = $("#window");

          $(".open-button").bind("click", function() {

            // call 'close' method on nearest kendoWindow
            // the above is equivalent to:

          if (!wnd.data("kendoWindow")) {
              modal: true,
              title: "Dialog window",
              close: function() {
              visible: false

See Also

Other articles and how-to examples on the Kendo UI Window:

For more runnable examples on the Kendo UI Window, browse the How To documentation folder.

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article