Extjs grid 设置行字体颜色


CustSuppGrid = Ext.create('Ext.grid.Panel', {
                title : '', // 标题头
                iconCls : 'icon-grid', // 标题图标
                store : CustSuppStore, // 数据源
                frame : false, // True 为 Panel 填充画面,默认为false
                forceFit : false, // 设置为true,则强制列自适应成可用宽度
                selType : 'checkboxmodel',
                columnLines : true, // 添加列的框线样式
                viewConfig : {
                    stripeRows : true, // 在表格中显示斑马线
                    enableTextSelection : true,
                    getRowClass : function(record, rowIndex, rowParams, store){ //根据状态改变当前行字体颜色
                        var csStatus = record.get('csStatus');
//             record.data.csStatus == '停用'
if ('停用' == csStatus) { return 'x-grid-row-red'; } } }, columns : [Ext.create('Ext.grid.RowNumberer', { width : 30, resizable : true }), { text : '记录ID', tooltip : '记录ID', dataIndex : 'id', width : 100, sortable : true, hidden : true }

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM