Kendo ui 在剑道网格中混合使用两个工具栏

Kendo ui 在剑道网格中混合使用两个工具栏,kendo-ui,kendo-grid,Kendo Ui,Kendo Grid,我有剑道格网。我正在使用工具栏中的“添加和自定义”按钮,代码如下: toolbar: ["create", { text: "Print record", className: "k-grid-custom", imageClass: "k-add" }], 我还想添加一个自定义工具栏(下拉菜单)作为 我在演示中使用了类似的代码,比如 toolbar: kendo.template($("#toolbarI

我有剑道格网。我正在使用工具栏中的“添加和自定义”按钮,代码如下:

toolbar: ["create", {
            text: "Print record",
            className: "k-grid-custom",
            imageClass: "k-add"
        }],
我还想添加一个自定义工具栏(下拉菜单)作为

我在演示中使用了类似的代码,比如

toolbar: kendo.template($("#toolbarIsExpire").html()),

<script type="text/x-kendo-template" id="toolbarIsExpire">
                <div class="toolbar">
                    <label  for="is_expired">Is Expired ?</label>
                    <input type="search" id="is_expired" style="width: 75px;"/>
                </div>
</script>
toolbar:kendo.template($(“#toolbarIsExpire”).html(),
过期了吗?
我想在工具栏中显示添加按钮、自定义按钮和下拉菜单(IsExpired)

如何在两个工具栏之间混合使用以同时使用它们?

扩展您的模板:

<script type="text/x-kendo-template" id="toolbarIsExpire">
    <div class="toolbar">
        <label  for="is_expired">Is Expired ?</label>
        <input type="search" id="is_expired" style="width: 75px;"/>
    </div>
    <a class="k-button k-button-icontext k-grid-add" href="#"><span class="k-icon k-add">  </span>Add new record</a>
</script>

过期了吗?

我以前试过,但得到一个错误:模板无效:'`Generated code:'var o,e=kendo.htmlEncode;使用(data){o='…`我通过添加两条反斜杠解决了这个错误。你能帮我解决这个问题吗,我卡在那里了,很抱歉我复制的哈希从html粘贴了这行,是的,它必须转义,因为你正确地发现了。我将在一点时间内看看你的另一个问题。