Product Bundles
DevCraft
All Telerik .NET and Kendo UI JavaScript components and AI Tools in one package.
Kendo UI
Bundle of AI Tools plus four JavaScript UI libraries built natively for jQuery, Angular, React and Vue.
Build JavaScript UI
Javascript
Telerik
Build modern .NET business apps
.Net Web
Cross-Platform
Desktop
Reporting and Documents
AI for Developers & IT
Ensure AI program success
AI Coding
AI Engineering
Additional Tools
Enhance the developer and designer experience
Testing & Mocking
Debugging
AI-Enhanced UI Tools
CMS
Free Tools
Support and Learning
Productivity and Design Tools
http://jsfiddle.net/OnaBai/5x8wt0f7/
What am I supposed to do if my data is
data: [ { proccess: "p1", estatus: 1, ob:{comment: "c1"} }, { proccess: "p2", status: 2, ob:{comment: "c1"} }, { proccess: "p3", status: 3, ob:{comment: "c1"} }, ],
wanted to get the same result as in fiddler
HTML:
<div id="grid"></div> <script id="status-template" type="text/kendo-templ"> # if (data.status === 1) { # <span style="color: red;">Status 1</span> # } else if (data.status === 2) { # <span style="color: yellow;">Status 2</span> # } else { # <span style="color: green;">Status 3</span> # } # </script> <script id="status2-template" type="text/kendo-templ"> #: ob.comment # </script>
JavaScript:
$("#grid").kendoGrid({ dataSource: { data: [ { proccess: "p1", status: 1, ob:{comment: "c1"} }, { proccess: "p2", status: 2, ob:{comment: "c1"} }, { proccess: "p3", status: 3, ob:{comment: "c1"} } ], pageSize: 20 }, height: 550, groupable: true, sortable: true, pageable: { refresh: true, pageSizes: true, buttonCount: 5 }, columns: [{ field: "proccess", title: "Contact Name", width: 200 }, { field: "status", title: "status", template: $("#status-template").html() }, { field: "comment", title: "comment", template: $("#status2-template").html() }] });
CSS:
#grid { width : 490px; }
I just found out the solution:
field: "ob.comment"