columns.Bound(p => p.Active).ClientTemplate("\\#if('#=Active#'=='Y') {\\<input type='button' value='OK' />\\}\\#").Width(150).Title("Status");
but condition is taken as string??
#if('Y'=='Y')`enter code here` {
<input type="button" value="OK">
}#
Try this,
columns.Bound(p => p.Active).ClientTemplate(
"# if (IsServiceExist) { #" +
"<input type='button' value='OK' />"+
"# }#").Width(150).Title("Status");
I hope you get the solution....
columns.Bound(p => p.IsActive)
.ClientTemplate(
"\\# if (IsActive != false) { \\#" +
"\\<input type=\"checkbox\" id=\"checkBox\" class=\"parentCheckBox\" window-call=\"template\" checked/>\\" +
"\\# } else { \\#" +
"\\<input type=\"checkbox\" id=\"checkBox\" class=\"parentCheckBox\" window-call=\"template\" />\\" +
"#\\ } \\#")
.Width(10);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With