【问题标题】:How to use more than one button in one field in Kendo Treelist?如何在 Kendo Treelist 的一个字段中使用多个按钮?
【发布时间】:2018-01-30 11:08:10
【问题描述】:

我想通过在 TreeList 中使用自定义命令在 Kendo Grid 等一个字段中使用 2 个或更多按钮,但我不能这样做。有人有解决办法吗?

【问题讨论】:

    标签: kendo-ui treelist


    【解决方案1】:

    您只需将一组按钮添加到列命令属性:

    $("#treeList").kendoTreeList({
      columns: [
        { field: "name" },
        {
            command: [
                {
                    name: "Cust1",
                    text: "Custom1",
                    click: function(e) {
                        alert("Custom1");
                    }
                },
                {
                    name: "Cust2",
                    text: "Custom2",
                    click: function(e) {
                        alert("Custom2");
                    }
                },           
            ]
        }
      ],
      editable: true,
      dataSource: dataSource
    });
    

    DEMO

    【讨论】:

    • 谢谢@ezanker,但请教一下如何使用 Kendo HtmlHelper 来实现这一点?
    猜你喜欢
    • 2018-07-28
    • 1970-01-01
    • 2015-11-22
    • 1970-01-01
    • 2011-07-04
    • 1970-01-01
    • 1970-01-01
    • 2013-02-01
    • 1970-01-01
    相关资源
    最近更新 更多