我想使用 panelBar.append 添加一个新面板,在使用中格式化内容.Content(@<text></text>);
当我使用 panelBar.Add() 时就像这个例子
panelbar.Add().Text("New Person")
.Content(@<text>
<br />
<br />
<div class="form-group">
@Html.LabelFor(model => model.firstName, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.firstName, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.firstName, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group">
@Html.LabelFor(model => model.surName, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.surName, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.surName, "", new { @class = "text-danger" })
</div>
</div>
</text>);
$("#panelbar").kendoPanelBar();
var panelBar = $("#panelbar").data("kendoPanelBar");
panelBar.append(
{
text: "New Person",
encoded: true,
content: "How to I place this <text>?"
}
)
如何使用 .append 执行此操作?谢谢