I need to apply a condition in my kendo grid column template.
Here is my code:
columns: [
{
field: "EmpName",
title: "Name",
template: '<a href="\\#" onclick="showName();">#= if (empName == null){ "show xxx"
} else {
// I want to show actual name if it is not null
empName
} #</a>'
},
Check this
'<a href="" onclick="showName();">'# if( empName==null) {#<span>show xxx<span># } else {#<span>#: empName#<span>#} #'</a>'
something like this should work for you:
# if(test == null) { #
<span style="border:1px solid red"></span>
# } else { #
<span style="border:1px solid lime"></span>
# } #
Don´t know how to do inline at the moment.
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