or
string.Format("<span title='#: {0} #'># if ({0} != null) {{# #= {0} # #}}#</span>", fieldName)
widget._events.change.push(function (event) { var minLength = $(element).attr("data-odata-minlength") || 2; var value = widget.value().trim(); if (value != '' && value.length >= Number(minLength) && widget.dataItem() == undefined && widget._data().length > 0) { var firstItem = widget._data()[0]; setTimeout(function () { $.each(widget._data(), function (index, item) { if (item.Id == firstItem.Id) { widget.select(index); return false; } }); }, 100); } });var dataSource = new kendo.data.HierarchicalDataSource({ data: folderStructure, schema: { model: { id: "Id", hasChildren: "HasChilds", children: { schema: { data: "items", model: { id: "Id", hasChildren: "HasChilds", children: { transport: { read: function (options) { var id = options.data.Id; $.ajax({ type: "POST", url: webserviceUrl + "/GetSubFolders", data: JSON.stringify({ parentFolderId: id }), processData: false, contentType: "application/json; charset=utf-8", dataType: "json", xhrFields: { withCredentials: true }, success: function (data) { options.success(JSON.parse(data.d)); }, error: function (data) { options.error(data); } }); } }, schema: { model: { id: "Id", hasChildren: "HasChilds" } } } } } } } }});