Search code examples
mvvmkendo-uicustom-binding

kendo mvvm: how to define a custom css binding


Is it true that: (or am I missing something?)

  • Kendo UI MVVM doesn't support css binding;

If it is, how to define a custom css binding?

I found an implementation here, but I only have the minified kendo js files, can anyone give a link to download the uncompressed kendo js files?

update

temp solution: http://feedback.kendoui.com/forums/127393-kendo-ui-feedback/suggestions/2782980-add-an-mvvm-css-binding

have to modify the kendo.web.js source code.


Solution

  • Kendo UI supports the "style" binding which sets arbitrary CSS attributes. Documentation is available here: http://docs.kendoui.com/getting-started/framework/mvvm/bindings/style

    On a side note you can create a custom binder without editing the source code. Here is how: http://docs.kendoui.com/getting-started/framework/mvvm/bindings/custom

    Finally you can use the attr binding to set the class attribute: http://jsbin.com/ojayoq/1/edit