For one of my Kendo UI Grids, I've specified a headerTemplate for a specific column. However, there doesn't seem to be any binding context in the template. I tied adding
<span data-bind='text: ko.toJSON($data)'></span>
to the template but nothing was rendered.
The grid is configured in the viewmodel using
self.gridConfig = {
data: self.Transactions,
height: 350,
pageable: {
pageSize: 5
},
useKOTemplates: true,
rowTemplate: "exportRowTemplate",
columns: [{
title: "Policy Number",
width: 120
}, {
title: "Insured Name",
width: 250
}, {
title: "Effective Date",
width: 120,
format: "{0:MM/dd/yyyy}"
}, {
title: "Transaction Type",
width: 150
}, {
title: "Premium",
format: "{0:c2}",
width: 120
}, {
headerTemplate: "<strong>Select</strong><span style='margin-left: 10px'><input type='checkbox' data-bind='checked: checkAllValue' /></span><span data-bind='text: ko.toJSON($data)'></span>"
}]
};
How do I bind the control that is in the headerTemplate?