zoukankan      html  css  js  c++  java
  • 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 }
  • 相关阅读:
    Java 异常基础详解
    Try-with-resources
    Java集合详解
    Java面向对象之多态
    Java面向对象之继承
    Java面向对象之封装
    Java 接口
    Java抽象类
    Java类和对象
    Java 数组结构
  • 原文地址:https://www.cnblogs.com/BobXie85/p/8274438.html
Copyright © 2011-2022 走看看