close

Triggered when a Window is closed either by the user or through the close() method.

Event Data

e.userTriggered Boolean

Indicates whether the close action was triggered by the user either by clicking the Close button or by pressing Esc. When the close method was called, this field is false.

e.preventDefault Function

If invoked prevents the Window from closing.

Example - subscribing to the close event during initialization

<div id="dialog"></div>
<script>
$("#dialog").kendoWindow({
  close: function(e) {
    // the closing animation is about to start
  }
});
</script>

Example - subscribing to the close event after initialization

<div id="dialog"></div>
<script>
function window_close(e) {
  // the closing animation is about to start
}
$("#dialog").kendoWindow();
var dialog = $("#dialog").data("kendoWindow");
dialog.bind("close", window_close);
</script>
In this article