I am receiving an error of
"Cannot read property 'find' of undefined"
when trying to render a grid control on a view component of an MVC 6 application that I am currently working on.
The error is coming from this portion of code in the kendo.all.js file where it appears to be trying to find the loading mask but says that container is undefined
progress: function(container, toggle) {
var mask = container.find(".k-loading-mask"),
support = kendo.support,
browser = support.browser,
isRtl, leftRight, webkitCorrection, containerScrollLeft;
The grid I am trying to populate seems pretty straight-forward to me .....below is the typescript I am using... what am I a doing wrong
$(
"#ConditionsSearchGrid"
).kendoGrid({
dataSource: {
transport: {
read:
this
._main.action_searchcondition.ResolveAction(),
contentType:
"application/json; charset=utf-8"
},
parameterMap:
function
(data, operation) {
return
{
searchstring: $(
"#searchstringtextbox"
).val()
}
},
error:
function
(e) {
var
msg = e.xhr.responseText;
alert(msg);
},
schema: {
model: {
fields: {
DiscName: { type:
"number"
},
Diagnosis_Description: { type:
"number"
},
Short_Description: { type:
"string"
},
IsSelected: { type:
"bool"
},
ICD9_cd: { type:
"string"
},
onset: { type:
"string"
},
isduplicate: { type:
"bool"
}
}
}
}
},
dataBound:
this
.ConditionsSearchLineItems_Databound,
height: 430,
sortable:
true
,
scrollable: {
virtual:
true
},
selectable:
"multiple row"
,
columns: [
{
template: "<input type=
'checkbox'
#= IsSelected?
checked=
'checked'
:checked=
''
# class='chkbx' />",
field:
"IsSelected"
,
title:
" "
},
{
field:
"DiscName"
,
title:
"Caredisc"
,
width:
"40%"
}, {
field:
"ICD9_cd"
,
title:
"Code"
,
width:
"10%"
}, {
field:
"Diagnosis_Description"
,
title:
"Diagnosis"
,
width:
"40%"
}, {
field:
"onset"
,
title:
"Type"
}]
});
}