Kendo 网格列模板中的条件 [英] Conditional in Kendo grid column template

查看:20
本文介绍了Kendo 网格列模板中的条件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在我的剑道网格列模板中应用一个条件.

I need to apply a condition in my kendo grid column template.

这是我的代码:

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>'
},

推荐答案

检查这个

'<a href="" onclick="showName();">'# if( empName==null) {#<span>show xxx<span># } else {#<span>#: empName#<span>#} #'</a>'

这篇关于Kendo 网格列模板中的条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆