or

<script id="demoTemplate" type="text/x-kendo-template">#if(person) { <h1>${person.name}</h1>}else { <h1>${id}</h1>}#</script> <script>
var data = [{"person":{"name":"saurabh"},"id":123},{"id":123}] window.kendoMobileApplication = new kendo.mobile.Application(document.body); $(document).ready(function () { $("#listUL").kendoMobileListView({ template: $("#demoTemplate").text(), dataSource: data }); } </script>
function BuildTree() { $(xmlDoc.getElementsByTagName("Item")).each(function () { var thisItem = $(this); var list = " "; var list1 = " "; $(parentIDFields).each(function (index, item) { if (thisItem.attr(item) != null && thisItem.attr(descriptionCol) != null) { if (index == 0) { list += "<li id=" + thisItem.attr("ID") + " onclick=sendHTML(" + thisItem.attr("ID") + ");>" + thisItem.attr(item); list1 += "</li>"; } else { list += "<ul><li id=" + thisItem.attr("ID") + " onclick=sendHTML(" + thisItem.attr("ID") + ");>" + thisItem.attr(item); list1 += "</li></ul>"; } } }); $("#treeView").append(list + "<ul><li id=" + thisItem.attr("ID") + ">" + thisItem.attr(descriptionCol) + " </li></ul>" + list1); }); $(document).ready(function () { $("#treeView").kendoTreeView(); });}$("#combobox").kendoComboBox({ dataTextField: "Description", dataValueField: "Code", filter: "contains", minLength: 3, autoBind: false, dataSource: { type: "json", serverFiltering: true, transport: { read: { url: serviceUrl + "HpCodes", contentType: "application/json; charset=utf-8", dataType: "json", data: { partialName: function () { return $("#combobox").val(); } } } } } });