Hi, I've been looking at this for sometime and I've even tried a few example that apparently work but they don't for me. All I want to do is say if ErrorCount > 0 then add a link similar to the WarningCount. Just to get the basics up and running and following an example I simply want to say if ErrorCount > 0 then show 'Yes' otherwise show 'No'. For some reason it seems to ignore the ClientTemplate and just show the ErrorCount value. Any ideas?? Please see the code below;
Many thanks.
Steve
@(Html.Kendo().Grid(Model)
.Name(
"Grid"
)
.HtmlAttributes(
new
{ style =
"height: 500px"
})
.Columns(columns =>
{
columns.Bound(p => p.ImportTypeName);
columns.Bound(p => p.ImportedRecordCount);
columns.Bound(p => p.FeedRecordCount);
columns.Bound(p => p.ErrorCount).ClientTemplate(
"# if (ErrorCount > 0) { #"
+
"Yes"
+
"# } else { #"
+
"No"
+
"#}#"
);
columns.Bound(p => p.WarningCount).Template(
@<text>
<a href=
"@Url.Content("
~/client/view/warnings/
" + @item.ImportTypeID)"
>@item.WarningCount</a>
</text>);
columns.Bound(p => p.CompletedOn);
})
.Sortable()
.Scrollable()
.Filterable()
)