kendo mvvm: how to define a custom css binding

Dean picture Dean · Feb 26, 2013 · Viewed 7.9k times · Source

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.

Answer

Atanas Korchev picture Atanas Korchev · Feb 26, 2013

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