大佬教程收集整理的这篇文章主要介绍了angularjs – Ag-grid显示行数,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
要么
指标:蓝色 – 人工存款,红色 – 存款失败,绿色 – 成功
(在此示例中使用自定义样式显示颜色)
这可能吗?
(顺便说一下,我正在使用Angular 1)
您在gridoptions.api.getModel().getRowCount()中有Y行总数.我假设的X行是指’当前显示的行’,我认为目前还没有获得它的方法.我们过去常常,所以我可能错了.
我想你在谈论改变单元格/行样式?对于单元格样式,请查看Column Definition cellClassRules.从网页:
您可以像这样使用它:
//'success','Manual' and 'Failed' are placeholders for the actual values // you must compare to. cellClassRules: { 'green': function(params) { return params.value === 'success'},'blue': function(params) { return params.value === 'Manual'},'red': function(params) { return params.value === 'Failed'} },
对于整行样式,您可以使用what I explained in this other question实现它
// Again,'success','Manual' and 'Failed' are placeholders // for the actual values you must compare to. gridoptions.api.getRowStyle(params) { switch(params.data.mycolumntocheck){ case 'success': return {'BACkground-color': 'green'}; case 'Manual': return {'BACkground-color': 'blue'}; case 'Fail': return {'BACkground-color': 'red'}; } return null; }
以上是大佬教程为你收集整理的angularjs – Ag-grid显示行数全部内容,希望文章能够帮你解决angularjs – Ag-grid显示行数所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。