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

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
    我的小鱼你醒了, 
还认识早晨吗? 
昨夜你曾经说, 
愿夜幕永不开启。 
初吻吻别的那个季节, 
不是已经哭过了吗? 
你的香腮边轻轻滑落的, 
是你的泪,还是我的泪。 
我的指尖还记忆著, 
你慌乱的心跳。 
温润的体香里, 
那一缕长髮飘飘。
——青青树 《魁拔》
交流群:ASP.NET交流群(2群) 58189568
        ExtJs4.2交流群(3群)97869295
 
                    
                
 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号