Hello,
I am trying to update the grid through popup
I am getting the below error
0x800a138f - JavaScript runtime error: Unable to get property 'data' of undefined or null reference
also if I click the Edit button and again click on cancel in the Edit popup , the record i have used is missing in the grid
Please help me
here is my code.
dataSource: {
type: "json",
transport: {
read: URL,
update: {
url: UpdateURL,
dataType: "json",
type: "POST"
},
parameterMap: function (data, operation) {
if (operation !== "read") {
return kendo.stringify(data);
}
}
},
requestStart: function(e) {
if (e.type == "update") {
//My LOGIC
debugger;
}
},
schema: {
type: "json",
id: "ID",
model: {
fields: {
ID: { type: "number", editable: false},
Name: { type: "string", validation: { required: true } },
Status: { type: "string" },
Access: { type: "string", nullable: true },
Address: { type: "string" },
Comment: { type: "string", validation: { required: true } },
ParentID: { type: "number", validation: { required: true } },
ParentName: { type: "string" },
}
}
},
serverPaging: false,
serverFiltering: false,
serverSorting: false
},
height: 550,
filterable: true,
sortable: true,
pageable: {
pageSize: 100,
refresh: true
},
columns: [
{ command: ["edit"], title: " ", width: "100px" },
{ field: "ID", title: "ID", width: "300px" },
{ field: "Name", title: "SubInventory", width: "300px" },
{ field: "Status", title: "Active", width: "75px" },
{ field: "Access", title: "Access", width: "200px" },
{ field: "Address" },
{ field: "Comment", tite: "Comments", width: "250px" },
{ field: "ParentID", title: "ParentName", width: "180px", editor: dropdownforParent}
]
, filterMenuInit: onFilterMenuInitSI,
editable: "popup",
}).data("kendoGrid");