I am trying to use the Kendo DatePicker from code generated and rendered into the view, I can make it work when part of the cshtml
e.g.
In cshtml:
@(Html.Kendo().DatePicker().Enable(!Model.ReadOnly).Name("DatePick").Value("12/25/2017").HtmlAttributes(new { style="width: 10% ", title="datepicker" }))
works fine.
when rendering from
result.Append("@(Html.Kendo().DatePicker().Enable(" + !ReadOnly + ").Name(\"a" + PrimKey + "\").Value(\"" + theDate + "\").HtmlAttributes(new { style=\"width: 10%\", title=\"datepicker\" }))\r\n");
I just get the text and no control.
I am using the code generation for all my controls on the page as it is dynamic and not a preset layout