title: kendo.bind throws Uncaught TypeError: Cannot read property 'replace' of undefined
body: <p>I have an issue in kendo bind. I use this code inside the kendo hierarchy grid</p>
  
  <p>Inside the grid </p>
  
  <pre><code> { command: { text: "@PMEasy.Web.Localization.Project.Resource.ProjectSite", click: OpenProjectSite }, title: " ", width: "110px" },
  </code></pre>
  
  <p>then </p>
  
  <pre><code> function OpenProjectSite(e)
  {
      var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
      $.ajax({
          url: "@Url.Action("GetCustomFieldForResource", "CustomField")",
          type: "POST",
          dataType: "json",
          data: { resourceId: dataItem.GUID },
          success: function (model) {
  
              if (model.dynamicFields.length &gt; 0) {
                  // convert the JSON to observable object
                  var viewModel = kendo.observable(model);
                  // bind the model to the container
                  kendo.bind($("#customfield"), viewModel);
                  var customfield = $("#customfield").data("kendoWindow");
                  customfield.center();
                  customfield.open();
              }
              else {
                  alert('@PMEasy.Web.Localization.CustomField.Resource.NoCustomFieldDefined');
              }
  
          }
      });
  }
  </code></pre>
  
  <p>In the above kendo bind not works, throws an error - Uncaught TypeError: Cannot read property 'replace' of undefined</p>
  
  <p>The div needs to bind as follows</p>
  
  <pre><code>  &lt;div id="customfield" style="display:none"&gt;
      &lt;div&gt;
          &lt;!-- container UL to host input fields --&gt;
          &lt;table border="1" cellpadding="1" cellspacing="1" style="width: 350px; margin:5px; font-size:12px"&gt;
              &lt;tbody data-template="fieldsTemplate" data-bind="source: dynamicFields"&gt;&lt;/tbody&gt;
              &lt;tr&gt;
                  &lt;td&gt; &amp;nbsp;&lt;/td&gt;
                  &lt;td&gt;&lt;input hidden id="ResourceId" data-bind="value:ResourceId" /&gt;&lt;button id="save" type="button" onclick="SaveCustomField();"&gt;@PMEasy.Web.Localization.Resource.Resource.Save&lt;/button&gt;&lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Helps? What may be the issue? </p>