EXTJS4.2 控件之Grid getRowClass 添加行背景色

mac2022-06-30  80

css 样式:

/*交流管理系统 开始*/ tr.x-grid-record-blue .x-grid-td { background: #87CEFF; }/*grid 行颜色*/ tr.x-grid-record-green .x-grid-td { background: #00ff90 }/*grid 行颜色*/ /*交流管理系统 结束*/

js:代码一

viewConfig: { forceFit: true, stripeRows: true, getRowClass: changeRowClass },

    代码二

function changeRowClass(record, rowIndex, rowParams, store) { if (record.get("SegmentType") == "1") { return 'x-grid-record-blue'; } else { return 'x-grid-record-green'; } }

 

链接相关:http://www.qeefee.com/article/000424

 

转载于:https://www.cnblogs.com/foreverfendou/p/4496856.html

相关资源:JAVA上百实例源码以及开源项目
最新回复(0)