Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Destory kendo window popup in close action in kendo UI

Am using kendo window for popup, when click on close anchor tag, it will close model window, but it sits in DOM. I wanted to destroy the model pop up. Below is my code. I tried this.destory() in close action, but it is not destroying. Please help me.

var selectRowsDialog = $("#select-Rows-dialog").kendoWindow({
            width: "800px",
            title: "Select rows",
            autoOpen: false,
            closable: true,
            modal: true,
            visible: false,
            close: function () { 
            },       
        }).data("kendoWindow").center().open();
like image 714
kranthi pothireddy Avatar asked Nov 06 '25 14:11

kranthi pothireddy


1 Answers

The best way is to destroy() the Window instance in its deactivate event. In this way you will not lose the closing animation.

<div id="window">Kendo UI Window here</div>

<script>
  $("#window").kendoWindow({
    deactivate: function(e) {
      e.sender.destroy();
    }
  });
</script>
like image 110
dimodi Avatar answered Nov 09 '25 09:11

dimodi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!