0
votes

I'm using a kendo grid and when I change a value from a dropdown menu, it doesn't save it in the row. As soon as you click off it reverts back to the same value.

$(function () {
    $("#grid").kendoGrid({
        pageable: true,
        height: 550,
        resizable: true,
        toolbar: ["create"],
        columns: [
            { field: "checkBox", filterable: false, title: "<input type=\'checkbox\' class='selectAll' />", width: "35px", template: "<input type=\'checkbox\' class=\'selectAll\' />" },
            { field: "index", filterable: true, title: "#", width: "35px" },
            { field: "Priority", editor: categoryDropDownEditor,  filterable: true, title: "Priority Two", width: "120px" },
        ],
        editable: true,
        })
    });

function categoryDropDownEditor(container, options) {
    $("<input data-bind='field:Priority' />")
        .appendTo(container)
        .kendoDropDownList({
            dataSource: [
                { title: "Yes" },
                { title: "No" }
            ],
            dataTextField: "title",
            dataValueField: "title",
        });
}

I just want to use a Yes/No drop down. The values are there when I click on the field, but when I select Yes or No, nothing gets inputted into the grid. Not sure why this isn't working.

1
do you find any solution to this? - saulyasar

1 Answers

2
votes

You can set valuePrimitive in your kendoDropDownList

Check this jsFiddle. Hope this works for you.