There are three ways to use the hash syntax in a Kendo template:
- Render literal values:
#= #
- Render HTML-enocded values:
#: #
- Execute arbitrary JavaScript code:
# if(...){# ... #}#
So in your code you would have to write
columns.Bound(p => p.Active).ClientTemplate(
"#if(Active=='Y') {#
<input type="button" value="OK">
#}#").Width(150).Title("Status");
Notice in the sample how the # signs separate inside code from outside code. When you're inside code you don't have to use # again to access a variable and that's why Active can be without # before.