0

I have my template (in "EditorTemplates" folder) and I try to display value of my model.

To display in an input, I do :

<input type="text" name="MyValue" data-bind="value:MyValue" />

But what if I just want to display one of values with Kendo, without an input field ?

EDIT :

For example, in the pure javascript kendo usage (without MVC helpers), you could do that with templates :

<script id="javascriptTemplate" type="text/x-kendo-template">
        <p>
            #= myCustomVariable #
        </p>
    </script>

Or with algorithms:

<script id="javascriptTemplate" type="text/x-kendo-template">
        <ul>
        # for (var i = 0; i < data.length; i++) { #
            <li>#= data[i] #</li>
        # } #
        </ul>
    </script>

How can I do that with kendo MVC templates ?

1 Answer 1

1

To display a value it is a similar concept to the input's.

Something like this:

 <span data-bind="text:yourValue"></span>

obviously you can change the html tag to your needs.

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks but do you know if it is possible to use it and display with algorithms ? like the #= MyValue # syntax for classic kendo template without MVC template system. See my first post edit for more informations.
will this be used purely for displaying information or will it also have editing features on it as well?
The both. I want purely display informations but I also want to use it for algorithms (for editing features).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.