This question is locked. New answers and comments are not allowed.
I am getting this terrible error. I am not certain why. I am including the error and line of js telerik js file as well.
error information.
Error: this.dataSource is undefined
Source File: telerik.grid.js
Line: 1498
this is in the layout page
Here is the razor page. This code worked before and mysteriously stopped working. I obviously made some sort of innocuous change that broke something. This is only part of the razor code. Thanks for the reply.
error information.
Error: this.dataSource is undefined
Source File: telerik.grid.js
Line: 1498
this is in the layout page
@( Html.Telerik().ScriptRegistrar() .DefaultGroup(group => group .Add("telerik.grid.editing.js") .Compress(true) ) )Here is the razor page. This code worked before and mysteriously stopped working. I obviously made some sort of innocuous change that broke something. This is only part of the razor code. Thanks for the reply.
<div id="bottomhalf"> <div id="repairlines"> <div class="t-web20"> @( Html.Telerik().Grid((List<IMRS.Model.WorkOrderRepairLine>)ViewData["workOrderRepairLine"]) .Name("WorkOrderRepairLines") .Columns(c => { c.Bound(o => o.WorkOrderRepairLineStatusId).ReadOnly().Title("Status").Width(50); c.Bound(o => o.Description).Title("Description").ReadOnly().Width(150); c.Bound(o => o.JobCodeDescription).ReadOnly().Title("Job Code").Width(50); c.Bound(o => o.WhyMadeCodeDescription).Title("Why Made Code").ReadOnly().Width(100); c.Bound(o => o.ConditionCodeDescription).Title("Condition Code").ReadOnly().Width(100); c.Bound(o => o.UnitLocationCodeDescription).Title("Location").ReadOnly().Width(20); c.Bound(o => o.DefectQuantity).ReadOnly().Width(50); c.Bound(o => o.DefectSize).ReadOnly().Width(50); c.Bound(o => o.RepairQuantity).ReadOnly().Width(50); c.Bound(o => o.RepairSize).ReadOnly().Width(50); c.Bound(o => o.ResposibilityCodeDescription).Title("Responsibility Code").ReadOnly().Width(100); c.Bound(o => o.J2ActivityID).Title("J2").ReadOnly().Width(50); c.Bound(o => o.LaborAmount).Title("Labor").ReadOnly().Width(70); c.Bound(o => o.MaterialAmount).Title("Material").ReadOnly().Width(70); c.Bound(o => o.TaxAmount).Title("Tax").ReadOnly().Width(70); }) .ClientEvents(events => events .OnLoad("onDataBinding") ) .Sortable() ) </div> </div> </div> @{Html.EndForm();}</div><script type="text/javascript"> var grid = null; function onDataBinding(result) { grid = $(this).data('tGrid'); } var currentInvoice; function UpdateWorkOrder(id) { $.ajax({ url: 'http://imrsrs/workorderservice/' + id + '', data: {}, type: "GET", success: function (data) { //alert(data.Company.CompanyName); }, dataType: "jsonp", jsonpCallback: "localJsonpCallback" }); } function localJsonpCallback(json) { currentInvoice = json; grid.dataBind(json.WorkOrderRepairLines); }</script>