If i change editable mode from popup to inline every field is filled correctly.
Did i missed something in the initialization of the grid/datasource?
browser: IE9
Kendo UI: Q3 2012
I've got the following Kendo Grid definition:
$("#grid").kendoGrid({
autoBind:false,
sortable: true,
filterable: true,
columnMenu: true,
height: 400,
columns: [
{ field: "StoreType", title: "Store Type", editor: StoreTypesDDEditor },
{ field: "City", title: "City", editor: CitiesDDEditor },
{ field: "Name", title: "Store Name" },
{ field: "Code1" },
{ field: "Code2" },
{ field: "Code3" },
{ command: ["edit", "destroy"], title: " ", width: "200px" }
],
detailTemplate: kendo.template($("#StoreDetailTempl").html()),
detailInit: detailInit,
editable: "popup",
toolbar: [{ name: "create", text: "Add new Store"}],
dataSource: dsStore
});
Definition of DataSource is:
function getStoreDS() {
return new kendo.data.DataSource
({
error : error,
schema: {
data: "d",
model: {
id: "IdStore",
fields: {
IdStore: { editable: false, nullable: true, type: "numeric" }
Name: { editable: true, type: "string", nullable: false },
IdCity: { editable: true, nullable: true, type: "numeric" },
City: { editable: true, nullable: true, type: "string" },
IdStoreType: { editable: true, nullable: false, type: "numeric" },
StoreType: { editable: true, nullable: false, type: "string" },
Code1: { editable: true, nullable: true, type: "string" },
Code2: { editable: true, nullable: true, type: "string" },
Code3: { editable: true, nullable: true, type: "string" },
}
}
},
transport: {
read: { url: "WCF/Store.svc/GetStores", contentType: "application/json; charset=utf-8", type: "POST" },
create: { url: "WCF/Store.svc/AddStore", contentType: "application/json; charset=utf-8", type: "POST" },
update: { url: "WCF/Store.svc/UpdateStore", contentType: "application/json; charset=utf-8", type: "POST" },
destroy: { url: "WCF/Store.svc/DeleteStore", contentType: "application/json; charset=utf-8", type: "POST" },
parameterMap: function(data, operation) {
if (operation != "read") {
data.IdCountry = $("#country").val();
return kendo.stringify({ store: data })
}
else {
//$("#grid").kendoAnimate({ effects: "slide:down fade:out", show: true });
return kendo.stringify({ IdCountry: $("#country").val() })
}
}
}
}); }