<script id="SCTemplate" type="text/kendo-tmpl">
@(Html.Kendo().Grid<SCVM>()
.Name("grid_#=SCartID#") // template expression, to be evaluated in the master context
.Columns(columns =>
{
columns.Bound(c => c.ci.SCID).Hidden().HtmlAttributes(new { @id = "SCID" });
columns.Bound(c => c.ci.FN).Title("Name");
columns.Bound(c => c.ci.IN).Hidden(true);
columns.Bound(c => c.ci.FN).Title("Item Number").Width(150);
columns.Bound(c => c.ci.IsDO).Title("Order Type").ClientTemplate("#if(convertToBoolean(cosci)){#<span class='glyphicon glyphicon-envelope'>hello</span#}#").HtmlAttributes(new { @class = "js-bl" }) ;
The above is a code snippet from a Hierarchical Grid Template. What I am attempting to do is show an icon based on the value of "cosci". The issue is, this value is null. The type of this object is string. But when the page is hit, the value is gone. My Previous attempts had me set the object type to boolean. In all cases, it always came back as null. Interestingly enough, the c.ci.IsDO is "true", and it's type is boolean. Is it possible to have conditional statements in a child template? Please provide source files or a link to documentation that will shed light on the issue; but not http://demos.telerik.com/aspnet-mvc/grid/, as that link does not address the issue.
FWIW, the convertToBoolean is a function I was using in attempt to change the types to achieve my desired result(s), this fails, because the sequence in which the objects are loaded into the DOM is unexpected.
Thanks.