<button> Disabled from boolean in observable

4 posts, 0 answers
  1. James
    James avatar
    20 posts
    Member since:
    Apr 2012

    Posted 18 May 2012 Link to this post

    How do I set enable/disable based on a value in the observable?

    I tried everything I can think of.

  2. Marc
    Marc avatar
    1 posts
    Member since:
    Feb 2012

    Posted 30 May 2012 Link to this post

    Hi James,

    there is an example in the MVVM documentation, see http://www.kendoui.com/documentation/framework/mvvm/bindings/disabled.aspx 

  3. Wannes
    Wannes avatar
    12 posts
    Member since:
    Oct 2011

    Posted 24 Aug 2012 Link to this post

    Hello James and Mark,

    I have the same kind of problem with the Q2 2012 release.
    This kind of binding only seems to initially disable the input element. When changing the viewmodel, the disabled attribute doesn't automatically change.

    You can, however, customize the binders to make it work. E.g.:
    kendo.data.binders.disabled = kendo.data.Binder.extend({
        refresh: function() {
            var element = $(this.element);
            var disabled = this.bindings["disabled"].get();
            if (disabled) {
                element.attr("disabled", "disabled").addClass("k-state-disabled").removeClass("k-state-focused");
            } else {

    Best Regards,
  4. tahmed
    tahmed avatar
    7 posts
    Member since:
    Aug 2012

    Posted 28 Mar 2014 Link to this post

    Is this issue resolved in latest release of Kendo UI.

Back to Top