小编use*_*844的帖子

Grid中的Kendo DropDownList在选择后显示值

我正在尝试在网格中使用下拉列表.这是我的网格定义:

$("#grid").kendoGrid({
    editable: true,
    dataSource: {
        data: data,
        schema: {
            model: {
                fields: {
                    Name: {
                        type: "string",
                        editable: false
                    },
                    FruitName: {
                        type: "string"
                    },
                    FruitID: {
                        type: "number"
                    }
                }
            }
        }
    },
    columns: [{
        field: "Name",
        title: "Name",
        width: 150
    }, {
        field: "Fruit",
        title: "Fruit",
        width: 115,
        editor: renderDropDown,
        template: "#=FruitName#"
    }]
});
Run Code Online (Sandbox Code Playgroud)

这是我的编辑功能:

function renderDropDown(container, options) {
    var dataSource = [
    //{ name: "", id: null },
    {
        FruitName: "Apple",
        FruitID: 1
    }, {
        FruitName: …
Run Code Online (Sandbox Code Playgroud)

javascript kendo-ui kendo-grid kendo-dropdown

4
推荐指数
1
解决办法
9928
查看次数

标签 统计

javascript ×1

kendo-dropdown ×1

kendo-grid ×1

kendo-ui ×1