Edit this page

Set New Lines in Grid Column From Data

Environment

Product Progress Kendo UI Grid
Made with version 2017.3.1026

Description

How can I set the / n in the response string and display it in the Grid column without using the template? What do I have to write in the AJAX response?

Solution

To display the text on two lines without implementing the column.template, use the br tag.

  1. Send the tag as part of the response.
  2. Set encoding to false.
<div id="grid"></div>
<script>
$("#grid").kendoGrid({
  columns: [
    { field: "name", encoded: false }
  ],
  dataSource: [ { name: "Jane Doe </br> test" } ]
});
</script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy