title: kendo mvvm - Uncaught TypeError: d.isSelectedHaertefallTyp is not a function(…)
body: <p>We are using <strong>kendo ui mvvm</strong> and we are having problems by binding methods to our view. we have the following viewModel:</p>
  
  <pre><code>    return kendo.observable({
          isSelectedHaertefallTyp: function () {
              return "test";
          },
          unternehmensbegrenzung: null,
          abnahmestellenbegrenzung: null,
          minDurchschnitt: null,
          maxDurchschnitt: null,
          bescheidbegrenzung: null,
          sollzahlung: null,
          bereitsGezahlt: null
      });
  </code></pre>
  
  <p>All properties are bounded correctly, but the method <strong>isSelectedHaertefallTyp</strong> does not get bounded and I get the following error: </p>
  
  <blockquote>
    <p>Uncaught TypeError: d.isSelectedHaertefallTyp is not a function(…)</p>
  </blockquote>
  
  <p>Here is how we binf this method in our view:</p>
  
  <p></p>
  
  <p>I'm afraid the view is trying to evaluate the method too early and at this point the bind has still not ocurred?</p>
  
  <p>Any suggestion how to solve this?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I could "heck" the solution by creating the same method name in the parent ViewModel.</p>
  
  <p>Thing is that I have a parent view and children with their own bindings. This works fine for properties, but not for method, so that is how thi works:</p>
  
  <pre><code>    base.prototype.bind.call(this); // parent binding
  
      this.generalInformationWizardStepComponent.bind(); // child binding
      this.additionalInformationWizardStepComponent.bind(); // child binding
      this.abnahmestelleWizardStepComponent.bind(); // child binding
      this.belieferungWizardStepComponent.bind(); // child binding
      this.summaryStepComponent.bind(); // child binding
  </code></pre>
  
  <p>And here is how I "hecked" the solution in the parent ViewModel:</p>
  
  <pre><code>return kendo.observable({
              isHaertefallTypSelected: function (value) {
                  /* Markup Method Only 
                     The method is been bounded to early trying to get it from parent ViewModel and not considering the children
                  */
              },
              showAdditionalInformation: true,
              currentStep: 0
          });
  </code></pre>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I found the issue, even tho I could not fix it. The problem is the parent has the children and bind them as well, so  this should be the fix: <a href="http://www.telerik.com/forums/nested-views-bindings" rel="nofollow noreferrer">http://www.telerik.com/forums/nested-views-bindings</a></p>