Hi,
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.
Dojo: https://dojo.telerik.com/AXojaNuT
In the above, I've bound the enabled state to a command button but it only makes the button look disabled, its still clickable.
Please advise.
Thanks,
Grant
5 Answers, 1 is accepted
Hello, Grant,
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:
https://dev.w3.org/html5/html-author/#the-a-element
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:
https://dojo.telerik.com/@bubblemaster/amIDIlUk
Kind Regards,
Alex Hajigeorgieva
Progress Telerik
Thanks Alex, you're a champion!
-Cheers, Grant
Hi, Grant,
I am glad you found my response helpful.
Regards,
Alex Hajigeorgieva
Progress Telerik
Nice, but this does not work using a real transport dataSource.
MVVM is broken as the grid binds the data.
Hello, Marck,
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:
https://dojo.telerik.com/eQoWECis
I will be glad to help if you can provide some more information.
Kind Regards,
Alex Hajigeorgieva
Progress Telerik