Hello, i'm unable to get the jquery grid to update using a webservice method, i'm running into Uncaught TypeError: Cannot read property 'call' of undefined - kendo.web.min.js:13. Here is how my grid and update method are defined. Could someone please point me in the right direction. Thanks!
var grid = $("#StatusGrid").kendoGrid({ dataSource: { transport: { read: function (options) { $.ajax({ type: "POST", url: "StatusDetailsWS.asmx/GetStatusesJSON", data: jsonReqID, contentType: "application/json; charset=utf-8", dataType: "json", dataFilter: function (data) { //debugger; var msg = eval('(' + data + ')'); // If the response has a ".d" top-level property, // return what's below that instead. if (msg.hasOwnProperty('d')) return msg.d; else return msg; }, success: function (msg) { if (msg && msg.Success == false) { // ToDo: Add Kendo Window dialog to //Show Error } if (msg && msg.Success) { // redirect to New Job var data = eval('(' + msg.ReturnValue + ')'); options.success(data); } }, error: function (jqXHR, textStatus, errorThrown) { options.error(jqXHR); //alert("error"); } }); }, update: { type: "POST", url: "StatusDetailsWS.asmx/UpdateStatusJSON", dataType:"json", contentType: "application/json" }, parameterMap: function (data, operation) { if (operation === "update" || operation === "create") { return JSON.stringify({ job : data }); } return data; } }, schema: { data: "Data", total: "Total", model: { fields: { jobNumber: { type: "number", editable:false }, parentStatus: { type: "string", editable:false }, childStatus: { type: "string", editable:false }, submitDate: { type: "date", editable:false }, userId: { type: "string", editable:false }, notes: { type: "string" } } } }, pageSize: 25, serverPaging: false, serverFiltering: false, serverSorting: false }, height: 300, filterable: false, sortable: true, pageable: true, columns: [{ field: "jobNumber", title: "Job #", width: 55, editable:false, template: "<a href='javascript:openJobStatus("#: data.jobNumber #");'>#: data.jobNumber #</a>" }, { field: "parentStatus", title: "Overall Status", editable:false, width: 70 }, { field: "childStatus", title: "Current Status", editable:false, width: 70 }, { field: "submitDate", title: "Submit Date", width: 95, editable:false, format: "{0:MM/dd/yyyy h:mm:ss tt}" }, { field: "userId", title: "Submitter", editable:false, width: 60 }, { field: "notes", title: "Notes", width: 180 }, { command:[{ id:"edit", name:"edit", template: "<a class='k-button k-grid-edit' href='' style='min-width:16px;'><span class='k-icon k-edit'></span></a>" } ], title:"", width:"20px" }, //{ // title: "", // template: "<a href='javascript:openJobStatus(\"#:jobNumber#\");'><img src='images/edit_m.png' alt='Edit Job' style='border:0;' /></a>", // width: 20 //}, { title: "", template: "<input type='image' alt='submit' title='Print Job' src='images/print_m.png' id='btnPrintJob' onclick='openPrintJobWindow(\"#:jobNumber#\");' style='border:0;' />", width: 20 }, { title: "", template: "<input type='image' alt='submit' title='Restore Request' src='images/wrench_m.png' id='btnRestoreRequest' onclick='restoreRequest(\"#:jobNumber#\");' style='border:0;' />", //hidden: !CanRestoreRequest, width: 20 }, { title: "", template: "<input type='image' alt='submit' title='Copy Request' src='images/copy_m.png' id='btnCopyRequest' onclick='copyRequest(\"#:jobNumber#\");' style='border:0;' />", width: 20 } ], editable:"inline" });
[WebMethod(true)]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public void UpdateStatusJSON(string job)
{
...
....
}