【发布时间】:2019-06-25 10:12:26
【问题描述】:
在我的剑道网格中,我可以使用以下方法更改单元格的颜色,但不能更改行的颜色。
对于值为rainy 的所有事件,我得到绿色,但红色仅适用于单元格而不适用于行。我怎样才能得到它?
$("#grid").kendoGrid({
dataSource: myDB,
height: 550,
{
field: "User",
title: "User",
width: "50px",
},
{
field: "WindSpeed",
title: "Wind Speed",
width: "40px"
},
{
field: "EventName",
title: "Event Type",
width: "50px",
attributes: {
" class": "# if(data.EventName === 'rainy') { # green # } else { # white # }, #"
},
}
}
【问题讨论】: