As my title says, Im trying to bind MVVM attributes to command buttons in a KendoGrid. At the moment im struggling with binding an 'enabled' attr.
In the above, I've bound the enabled state to a command button but it only makes the button look disabled, its still clickable.
5 Answers, 1 is accepted
Thank you very much for the provided runnable Dojo. The approach that you have taken is absolutely spot on, the only issue stands with the chosen element in the template. It is not a button - it is an anchor tag and disabled is not a valid attribute for an anchor tag:
If you replace the <a> with a <button>, the logic will work as expected. I have also updated the Dojo to use an MVVM bound grid. Here it is for your reference:
Thanks Alex, you're a champion!
Nice, but this does not work using a real transport dataSource.
MVVM is broken as the grid binds the data.
There must be something else in the project you are working on that is breaking the binding as I tested with a remote data source with transport and it works as expected:
I will be glad to help if you can provide some more information.