I have this dojo with its inline template
var actionName = 'read';
$("#grid").kendoGrid({
columns: [
{ field: "name" },
{ field: "age" }
],
dataSource: [
{ name: "Jane Doe", age: 30, read: true, actionName: actionName }
],
detailTemplate: "<div> #:" + actionName +"# </div>"
});
and this dojo with its external template:
<script id="detailTemplate" type="text/x-kendo-template">
#: actionName #
</script>
var actionName = 'read';
$("#grid").kendoGrid({
columns: [
{ field: "name" },
{ field: "age" }
],
dataSource: [
{ name: "Jane Doe", age: 30, read: true, actionName: actionName }
],
detailTemplate: function(dataItem){
return kendo.template($("#detailTemplate").html())(dataItem);
}
});
In first one detailTemplate: "<div> #:" + actionName +"# </div>"
I can render value: true
however in second one wiht #: actionName #
I can render read
.
So my question how can I render to value true
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…