我有一个剑道PanelBar
,目前有两个面板。在 Ist 面板中,我有一个 Kendo TreeView
,在第二个面板中,我有多个 Kendo AutoComplete
。现在我必须在每个上方插入标签AutoComplete
以显示一些信息,还必须插入一个按钮来对AutoComplete
s 的内容执行操作。我找不到为此编写我的 HTML 的地方。
这是我呈现 PanelBar 的 .cshtml 代码
@{Html.Kendo().PanelBar()
.Name("PanelBar")
.ExpandMode(PanelBarExpandMode.Single)
.Items(item =>
{
item.Add()
.Text("My Cloud")
.Content(() =>
{
Html.Kendo().TreeView()
.Name("serverTree")
.DragAndDrop(false)
.ExpandAll(true)
.Events(events => events
.Select("onSelect")
)
.BindTo(Model as System.Collections.IEnumerable, (Kendo.Mvc.UI.Fluent.NavigationBindingFactory<TreeViewItem> mappings) =>
{
...
//removed for brevity
...
}).Render();
});
item.Add()
.Text("Search")
.Content(() =>
{
//this is where I need to insert a label
Html.Kendo().AutoComplete()
.Name("Category")
.Filter("startswith")
.Placeholder("Enter Category...")
.BindTo(new string[] {
"Albania",
"Andorra",
"Armenia",
"Austria",
"Azerbaijan",
"Belarus",
"Belgium",
"Bosnia & Herzegovina",
"Bulgaria"
})
.Separator(", ").Render();
//another label
Html.Kendo().AutoComplete()
.Name("SubCategory")
.Filter("startswith")
.Placeholder("Enter SubCategory...")
.BindTo(new string[] {
"Albania",
"Andorra",
"Armenia",
"Austria",
"Azerbaijan",
"Belarus",
"Belgium",
"Bosnia & Herzegovina",
"Bulgaria"
})
.Separator(", ").Render();
//another label
Html.Kendo().AutoComplete()
.Name("Keywords")
.Filter("startswith")
.Placeholder("Enter keywords...")
.BindTo(new string[] {
"Albania",
"Andorra",
"Armenia",
"Austria",
"Azerbaijan",
"Belarus",
"Belgium",
"Bosnia & Herzegovina",
"Bulgaria"
})
.Separator(", ").Render();
//And finally the button
});
})
.Render();
}