我试图为组合框设置值,它在页面上正确显示,但是options.models
没有得到。任何人都可以帮助我..非常感谢
dataSource: {
batch: true,
columns:{
{ field: "cluster_name", editor: myEditor},
}
transport: {
create: {
url: "127.0.0.1/create",
dataType: "jsonp",
}
paramterMap: function(options, operation){
if (operation == "create"){
console.log(options.models) ;// no value
return {models: kendo.stringify(options.models);
}
}
}
}
function myEditor(container, options){
.appendTo(container)
$('<input name="' + options.field +'"/>')
.kendoComboBox({
dataTextField : "id",
dataValueField: "name",
dataSource: [
{ "id": "yes", "name": "yes"},
{"id": "no", "name": "no"}
]
})
}
var combox = $('#mygrid').data("kendoComboBox");
combox.value("yes"); //page is correctly, options.models doesn't get.