Javascript 剑道UI网格弹出编辑自定义模板-添加多选控件

Javascript 剑道UI网格弹出编辑自定义模板-添加多选控件,javascript,jquery,kendo-ui,Javascript,Jquery,Kendo Ui,我正在为网格的编辑弹出选项使用自定义弹出编辑器模板: editable: { mode: "popup", template: $("#popup_editor").html() }, <!-- popup editor template --> <script id="popup_editor" type="text/x-kendo-template"> template </scrip

我正在为网格的编辑弹出选项使用自定义弹出编辑器模板:

editable: { mode: "popup",
    template: $("#popup_editor").html()
      },

<!-- popup editor template -->
    <script id="popup_editor" type="text/x-kendo-template">
            template
            </script>
可编辑:{模式:“弹出”,
模板:$(“#弹出式编辑器”).html()
},
模板
模板要求有一些不在网格中的多选控件,用户在这些多选控件中选择的内容的摘要决定了网格中的“摘要”字段。例:

(多选1)颜色:红色、蓝色、紫色——不是网格中的字段 (多选2)大小:xs,s--不是网格中的字段

摘要:color=“红、蓝、紫”;size=“xs,s”-网格中显示的字段


问题是:如何在编辑弹出式自定义模板中添加multi-select

您可以使用为字段指定自定义编辑器功能,它甚至适用于弹出式编辑模式

columns: [ {
    field: "name",
    editor: function(container, options) {
     // create an input element
     var select= $("<select/>");
     // set its name to the field to which the column is bound ('name' in this case)
     select.attr("name", options.field);
     select.appendTo(container);
     select.kendoMultiSelect({ 
     dataSource: {
        data: ["red", "blue"]
       }    
     });
    }
  } ],
列:[{
字段:“名称”,
编辑器:函数(容器、选项){
//创建一个输入元素
var select=$(“”);
//将其名称设置为列绑定到的字段(本例中为“名称”)
选择.attr(“name”,options.field);
选择.appendTo(容器);
select.kendoMultiSelect({
数据源:{
数据:[“红色”、“蓝色”]
}    
});
}
} ],

Jayantha我很感谢您的评论,但多选字段实际上不是网格字段的一部分。然后您可以在网格中的
edit
功能中执行此操作,每当您单击编辑时,就会调用该功能,您可以使用e.container?在线演示答案访问弹出窗口中的html: