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 }
  • 相关阅读:
    126
    125
    124
    123
    122
    121
    120
    119
    洛谷 P5407 【[THUPC2019]历史行程】
    济南清北学堂七日游
  • 原文地址:https://www.cnblogs.com/BobXie85/p/8274438.html
Copyright © 2011-2022 走看看