I'm trying to add a RadioGroupFor control to a Toolbar control as a templated item but am getting a JS error related to the generated client template.
Here is the template definition:
<script id="ApproveOrDenyTemplate" type="text/x-kendo-template">
@(Html.Kendo().RadioGroupFor(model => model.ApproveOrDeny)
.Layout(RadioGroupLayout.Horizontal)
.HtmlAttributes(new { style = "display: inline-flex; vertical-align: top;" })
.LabelPosition(RadioGroupLabelPosition.After)
.Items(i =>
{
i.Add().Label("Approve").Value("Approve");
i.Add().Label("Deny").Value("Deny");
})
.Events(e => e.Change("changeApproveOrDeny"))
.ToClientTemplate()
)
</script>
Here is the Toolbar templated item entry:
items.Add() .TemplateId("ApproveOrDenyTemplate") .Hidden(!Model.ShowApprovalRadioGroup);
VM48:1 Uncaught SyntaxError: Unexpected token '<'
kendo.syncReady(function(){jQuery("\#ApproveOrDeny").kendoRadioGroup({"change":changeApproveOrDeny,"items":[{"label":"Approve","value":"Approve"},{"label":"Deny","value":"Deny"}],"value":"Approve","layout":"horizontal","labelPosition":"after"});});<\/script>