【发布时间】:2016-10-18 16:20:02
【问题描述】:
以下代码不起作用。谁能帮我写信和else if 这里的条件?
function getMyColumns() {
return [{
field: "xxx",
title: "1st",
width: "75px",
}, {
field: "ChoiceCode",
title: "2nd",
width: "75px",
template: "#if(ChoiceCode == null) {# #} else If(mychoice == ChoiceCode) {#" +
"{ #<div style='background-color:lightgreen'><span>#=ChoiceCode#</span></div>#}" +
"else {# <span>#=secondChoiceCode#</span> #}" +
"#}#"
}, {
}];
}
在选择字段中,如果它为空,我想显示一个空字符串,如果它有一个值并且它与我的选择相匹配,我想用绿色突出显示该单元格如果它与我的选择不匹配,请不要突出显示它.
【问题讨论】:
标签: javascript jquery kendo-ui kendo-grid