CustSuppGrid = Ext.create('Ext.grid.Panel', {title : '', // 标题头iconCls : 'icon-grid', // 标题图标store : CustSuppStore, // 数据源frame : false, // True 为 Panel 填充画面,默认为falseforceFit : 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}