繁体   English   中英

具有功能的CellClass不起作用(ng-grid)

[英]CellClass with function does not work (ng-grid)

如果我写,就像下面

{ field: 'NumberOfDaysSinceFailure', displayName: 'Days on Watchlist',
        cellClass: function (grid, row, col, rowRenderIndex, colRenderIndex) {
            return 'green';
            }
        }

这是行不通的

但是,如果我写像

{ field: 'NumberOfDaysSinceFailure', displayName: 'Days on Watchlist',
            cellClass: 'green'

            }

它按我想要的方式工作。 有什么建议么?

使用cellTemplate

如果特定样式的最新样式将不应用cellClass

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM