title: Closing a Kendo window using close button
body: <p>I am opening a kendo window (a cshtml view) from an asp.net application. I am opening this using a div like this from the aspx page.</p>
  <pre><code>&lt;div id=&quot;comments&quot;&gt;&lt;/div&gt;
  </code></pre>
  <p>Within the window Want to close it using a button. I am using below javascript function to close it on button click.</p>
  <pre><code>function CloseWindow() {
      $(&quot;#comments&quot;).data(&quot;kendoWindow&quot;).close();
  }
  </code></pre>
  <p>But i am getting following error:</p>
  <p>VM3356:18 <code>Uncaught TypeError: Cannot read properties of undefined (reading 'close')</code></p>