When attempting to find my column template using
var
userActivityTemplate = kendo.template(
this
.columns[9].template);
I am receiving the following error:
Uncaught TypeError: Cannot read property
'template'
of undefined
at init.excelExport (user-task-summary.js:328)
at init.trigger (kendo.all.min.js:25)
at init.<anonymous> (kendo.all.min.js:30)
at Object.proxy (jquery-2.1.4.js:512)
at Object.<anonymous> (jquery-2.1.4.js:3256)
at fire (jquery-2.1.4.js:3099)
at Object.add [as done] (jquery-2.1.4.js:3145)
at Array.<anonymous> (jquery-2.1.4.js:3255)
at Function.each (jquery-2.1.4.js:374)
at Object.<anonymous> (jquery-2.1.4.js:3252)
It appears that when using multiple header rows, the template is not a defined key.
Here is my multiple header column definition
{
title:
"Activity"
,
columns: [
{
field:
"estimatedHours"
,
title:
"Estimated"
},
{
field:
"userActivityMinutes"
,
title:
"User"
,
template:
function
(dataItem) {
return
FormatMinutesToHours(dataItem.userActivityMinutes);
}
},
{
field:
"activityTotalMinutes"
,
title:
"Total"
,
template:
function
(dataItem) {
return
FormatMinutesToHours(dataItem.activityTotalMinutes);
}
}
]
}
attached is the console output with the column definition expanded.
Can you tell me the proper way to locate the template definition in this scenario?
Thank you