Conditional in Kendo grid column template

不羁岁月 提交于 2019-12-03 10:53:12

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.

atik sarker

Hope it will also help

<script type="text/x-kendo-template" id="template">
    <div id="details-container">
       <dt> Name:</dt> #= Name #
      <br>  
       <dt>Selected Device: </dt>  iOS:-# if (PushToiOS == true) { #Yes# } else { #No# } #,
                                   Android:-# if (PushToAndroid == true) { #Yes# } else { #No# } #,
                                   WP:-# if (PushToWP == true) { #Yes# } else { #No# } #
      <br>
       <dt>Expire Date:</dt> #= kendo.toString(ExpiredDate, "MM/dd/yyyy") #
      <br>
    </div>
</script>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!