Hi,
I've written the following custom binder to enable/disable multiple input controls inside a div at once, instead of having to set the enabled/disabled binder on each and every control:
The above works fine on all "HTML" controls, not Kendo UI widgets (dropdownlist, etc.).
Would it be possible to write a single custom binder that can work fine with both widgets and normal html controls?
Best regards
Bilal Haidar
I've written the following custom binder to enable/disable multiple input controls inside a div at once, instead of having to set the enabled/disabled binder on each and every control:
kendo.data.binders.toggleState = kendo.data.Binder.extend({ refresh: function() { var that = this; var value = that.bindings["toggleState"].get(); // get value of binding from viewmodel if (value) { // true = enable $(that.element).find(':input').removeAttr('disabled'); } else { $(that.element).find(':input').attr('disabled', 'disabled'); } }});The above works fine on all "HTML" controls, not Kendo UI widgets (dropdownlist, etc.).
Would it be possible to write a single custom binder that can work fine with both widgets and normal html controls?
Best regards
Bilal Haidar