本文介绍了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网格列模板中的条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!