title: KendoUI Custom Command Popup : ReferenceError: wnd is not defined
body: <p>i am trying to popup window using custom command;</p>
  
  <pre><code> $(document).ready(function(){
          var wnd, detailsTemplate;
          $("#grid").kendoGrid({
              dataSource:{
                  serverPaging: true,
                  transport: {
                      read: "&lt;?php echo base_url() ?&gt;index.php/user_management/manage_users/list_view/"
                  },
                  schema:{
                      data: "data",
                      total: "total"
                  },
                  pageSize:5
              },
              scrollable: true,
              selectable: true,
              sortable: true,
              filterable: true,
              pageable: {
                  input: true,
                  numeric: false
              },
  
              columns: [
                  {
                      field: "UserID",
                      hidden:true
                  },
                  {
                      field: "Username",
                      title:"Username"
                  },
                  { field: "FirstName",
                      title:"First Name"
                  },
                  {field:"MiddleNames"},
                  {field:"LastName"},
                  {field:"City"},
                  {field:"Email"},
                  //{field:"Actions"},
                  {command: { text: "Details", click: showDetailsPopup }, title: " ", width: "140px" }
              ]
  
  
          });
          wnd = $("#details")
                  .kendoWindow({
                      title: "Customer Details",
                      modal: true,
                      visible: false,
                      resizable: false,
                      width: 300
                  }).data("data");
          detailsTemplate = kendo.template($("#template").html());
  
  
      });
  
      function showDetailsPopup(e) {
          e.preventDefault();
          var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
          wnd.content(detailsTemplate(dataItem));
          wnd.center().open();
      }
  </code></pre>
  
  <p>But when i click on "Details" button in the grid, i see this error in firebug; <br /></p>
  
  <pre><code>ReferenceError: wnd is not defined
  [Break On This Error]   
  
  wnd.center().open();
  </code></pre>
  
  <p>Updated: here is my template</p>
  
  <pre><code>&lt;script type="text/x-kendo-template" id="template"&gt;
          &lt;div id="details-container"&gt;
              &lt;h2&gt;#= FirstName #&lt;/h2&gt;
          &lt;/div&gt;
  &lt;/script&gt;
  </code></pre>