O'Reilly logo

Learning Kendo UI Web Development by John Adams

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Data-bind properties for Kendo MVVM

There are thirteen different types of values that can be used inside of the data-bind Kendo UI attribute. Here is a summary of their definitions and uses.

The attr property

The attr property is used to bind the value of a View-Model to a specific HTML attribute of a page element. For example, this is very useful for setting attributes such as the src for an image or the href for an anchor tag.

... //View-Model definition
imageSource: 'http://www.images.com/randomImage.jpg',
...
<img data-bind="attr: {src: imageSource}" />

A binding like this would guarantee that the image would change along with the View-Model to allow for dynamically loading or changing images on a web page.

Note that the attr property can set ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required