zoukankan      html  css  js  c++  java
  • Extjs关于grid 行变色

        //頁面加載時創建grid
        var gdProductStock = Ext.create('Ext.grid.Panel', {
            id: 'gdProductStock',
            store: ProductStockStore,
            height: '600',
            columnLines: true,
            frame: true,
            hidden: true,
           
            columns: [
                { xtype: 'rownumberer'},
                { header: ITEMID, dataIndex: 'item_id', 150, align: 'center' },
                { header: PRODUCTID, dataIndex: 'product_id', 150, align: 'center' },
                { header: PRODUCTSTOCK, dataIndex: 'item_stock', 150, align: 'center' },
                { header: PRODUCTALARM, dataIndex: 'item_alarm', 150, align: 'center' }
            ],
            listeners: {
                scrollershow: function (scroller) {
                    if (scroller && scroller.scrollEl) {
                        scroller.clearManagedListeners();
                        scroller.mon(scroller.scrollEl, 'scroll', scroller.onElScroll, scroller);
                    }
                }
            },
            viewConfig: {
                forceFit: true,

               getRowClass: function (record, rowIndex, rowParams, store) {
                    if (record.data.type == "1") {
                        return 'product_stock_type';//注意这里返回的是定义好的css类;列如:(.ppp_ddd_sss div{background-color:red})定义到你页面访问到的css文件里。
                    }
                }
            }
        });

  • 相关阅读:
    OS模块功能
    read()、readline()、readlines()区别
    【ML-0-2】矩阵求导-定义法和微分法
    【ML-0-1】矩阵求导-定义和求导布局
    博客园转文章的方法
    风格迁移论文--Arbitrary style transfer in real-time with adaptive instance normalization
    【TF-3-2】Tensorflow-mnist的手写识别
    【TF-3-1】Tensorflow--简单线性拟合
    图像分割简介
    图像表示与图像处理的基本概念
  • 原文地址:https://www.cnblogs.com/wzj-520j/p/4063013.html
Copyright © 2011-2022 走看看