【问题标题】:Does we have Kendo TreeListview control?我们有 Kendo TreeListview 控件吗?
【发布时间】:2014-07-29 16:22:44
【问题描述】:
【问题讨论】:
标签:
c#
silverlight
kendo-ui
telerik
treelistview
【解决方案2】:
目前没有 Kendo UI TreeList 组件,但它是 UserVoice 上评分最高的项目之一,因此它很可能会包含在未来的版本中。这时候,我们既可以在 Kendo UI 旁边使用 RadTreeListView,也可以使用 Kendo UI TreeView 并设置一个模板,以便每个项目呈现一个表格布局。这是实现它的方法
$("#treelist").kendoTreeView({
template: function (options) {
var htmlbuilder = '';
htmlbuilder = htmlbuilder + '<span style="float:left; width:150px;">' + options.item.Name + '</span>';
htmlbuilder = htmlbuilder + '<span style="float:right; min-width:50px;">' + options.item.AcquisitionCost + '</span>';
htmlbuilder = htmlbuilder + '<span style="float:right; min-width:50px;">' + options.item.OneTime + '</span>';
htmlbuilder = htmlbuilder + '<span style="float:right; min-width:50px;">' + options.item.Recurring + '</span>';
htmlbuilder = htmlbuilder + '<span style="float:right; min-width:50px;">' + options.item.BaseCapacity + '</span>';
return htmlbuilder;
}};