To see the code in action, see this Plunker:


The following HTML page shows a input box.

When the users start typing in the input box the SPAN element next to it will show the value just entered (onkeypress).



<!DOCTYPE html>
    <title>Kendo element binding research page.</title>
        * {
            margin: 0;
            padding: 0;
        body {
            padding: 20px;
    <link href="//" rel="stylesheet" type="text/css" />
    <link href="//" rel="stylesheet" type="text/css" />
    <script src="//"></script>
    <script src="//"></script>
    <div id="view">
        <input data-bind="value: inputValue, events: { keypress: showValueOnLabel }" />
        <span data-bind="text: label"></span>
        var viewModel = kendo.observable({
            inputValue: "Enter some text",
            label: "",
            showValueOnLabel: function (e) {
                var pressedKey = String.fromCharCode(e.charCode);
                var currentValue = e.currentTarget.value;
                this.set("label", currentValue + pressedKey);

        kendo.bind($("#view"), viewModel);

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.