title: KendoUI - How to reference control?
body: <p>I am handling the edit even via grid.bind:</p>
  
  <pre><code>$(document).ready(function () { 
      //  Dialog related
      var grid = $("#MyGrid").data("kendoGrid");
  
      grid.bind("edit", function (e) {
          var datePicker = $("#EndDate").getKendoDatePicker();
          if (e.model.isNew()) {
              e.container.kendoWindow("title", "Add Something");
          }
          else {
              e.container.kendoWindow("title", "Edit Something");                             
          }
      });
  });
  </code></pre>
  
  <p>The first time the event fires, the datepicker is a usable object.
  Subsequent firing of the event has datepicker as undefined.</p>
  
  <p>UPDATE: I also created a sample non-kendo page that does the same thing:</p>
  
  <p><a href="http://jsbin.com/uZEqiMo/1/edit?html,js,output" rel="nofollow">http://jsbin.com/uZEqiMo/1/edit?html,js,output</a></p>
  
  <p>Can anyone explain what the difference is and what I can do in kendo-ui to get the reference every time?</p>