使用网格中的“td”值设置下拉列表默认值

时间:2017-07-07 07:45:57

标签: javascript kendo-ui grid dropdown

我有一个复杂的问题,我有一个网格,每行有一个按钮可以编辑,当你点击按钮弹出编辑器显示编辑行时,在弹出菜单中有一个删除下拉列表,其中列出了所有可能的“产品名称”,但问题是当这个弹出编辑器提示时,下拉列表中选择的值不同于相应“产品名称”值的值是行,如何我可以根据行中相应单元格值(名字)中的值设置下拉列表。

 columns: [
     { field: 'Productname', title: 'Product name',width: '100px', editor: ProductNameDropDownEditor},
     { field: 'Password', title: 'Producer', width: '80px' },
     { command: ["edit"], title: " ", width: "100px" }],
     editable: "popup",
});


function ProductNameDropDownEditor(container, options) {  

    $('<input  name="ProductName" data-type="string" \">')
        .appendTo(container)
        .kendoDropDownList({
            dataSource: mydata,
            dataTextField: "Text",

        });                     

}    

0 个答案:

没有答案