css 样式:

/*交流管理系统 开始*/
tr.x-grid-record-blue .x-grid-td { background: #87CEFF; }/*grid 行颜色*/ tr.x-grid-record-green .x-grid-td { background: #00ff90 }/*grid 行颜色*/
/*交流管理系统 结束*/

js:代码一

    viewConfig: {
forceFit: true,
stripeRows: true,
getRowClass: changeRowClass
},

代码二

function changeRowClass(record, rowIndex, rowParams, store) {

    if (record.get("SegmentType") == "1") {
return 'x-grid-record-blue';
} else {
return 'x-grid-record-green';
}
}

链接相关:http://www.qeefee.com/article/000424

EXTJS4.2 控件之Grid getRowClass 添加行背景色的更多相关文章

  1. EXTJS4.2 控件之Grid 根据数据源某列数据不同绑定不同的控件setEditor

    Grid 根据数据源某列数据不同绑定不同的控件,例如:文本框和下拉框 主要代码写在grid的  plugins: [rowEditing],下面这是定义的rowEditing对象,这里面的要定义成 E ...

  2. EXTJS4.2 控件之Grid 行点击事件

    listeners: { 'itemclick': function (view, record, item, index, e) { //Ext.MessageBox.alert("标题& ...

  3. 重新想象 Windows 8 Store Apps (7) - 控件之布局控件: Canvas, Grid, StackPanel, VirtualizingStackPanel, WrapGrid, VariableSizedWrapGrid

    原文:重新想象 Windows 8 Store Apps (7) - 控件之布局控件: Canvas, Grid, StackPanel, VirtualizingStackPanel, WrapGr ...

  4. Android 使用shape定义不同控件的的颜色、背景色、边框色

    Android 使用shape定义不同控件的的颜色.背景色.边框色 设置按钮的右边框和底边框颜色为红色,边框大小为3dp: 在drawable新建一个 buttonstyle.xml的文件,内容如下: ...

  5. EXTJS 4.2 资料 控件之Grid 那些事

    最近在学习Extjs4.2 ,积累文章,看得不错,再此留年: //表格数据最起码有列.数据.转换原始数据这3项 Ext.onReady(function(){ //定义列 var columns = ...

  6. 一个关于ExtJS4具体控件的详细教程

    发现一遍介绍ExtJS控件介绍的比较好的系列文章,在此做总结 ExtJs4 笔记(1) ExtJs大比拼JQuery:Dom文档操作 ExtJs4 笔记(2) ExtJs对js基本语法扩展支持 Ext ...

  7. EXTJS 4.2 资料 控件之Grid 添加行,编辑行,删除行

    //SiteVariableConfigValue类,创立一个模型类 Ext.define("SiteVariableConfigValue", { extend: "E ...

  8. EXTJS 4.2 资料 控件之Grid 行编辑绑定下拉框,并点一次触发一次事件

    主要代码: { header: '属性值', dataIndex: 'PropertyValueName', width: 130, editor: new Ext.form.field.ComboB ...

  9. EXTJS 4.2 资料 控件之Grid Columns 列renderer 绑定事件

    columns: [ { header: '序号', xtype: 'rownumberer', align: 'center', width: 100 }, { header: 'CompanyId ...

随机推荐

  1. Mysql 死锁相关操作

    该随笔随时记录日常工作中遇到的关于mysql的死锁相关问题 1)查看mysql当前的处理线程(connection) mysql> show processlist; 2)杀掉对应的connec ...

  2. Java操作zip压缩和解压缩文件工具类

    需要用到ant.jar(这里使用的是ant-1.6.5.jar) import java.io.File; import java.io.FileInputStream; import java.io ...

  3. 关于Windows下mysql忘记root密码的解决方法

    原文链接: http://www.cnblogs.com/andy_tigger/archive/2012/04/12/2443652.html 1. 首先检查mysql服务是否启动,若已启动则先将其 ...

  4. Jersey(1.19.1) - Client API, Security with Http(s)URLConnection

    With Http(s)URLConnection The support for security, specifically HTTP authentication and/or cookie m ...

  5. Unity3D 判断鼠标是否按在UGUI上

    判断鼠标是否点击在UGUI上 #if UNITY_ANDROID && !UNITY_EDITOR #define ANDROID #endif #if UNITY_IPHONE &a ...

  6. oracle中比较两表表结构差异和数据差异的方法

    在工作中需要完成这么一个需求:比较两个表的表结构是否形相同,并找出差异.比较两个表中的数据是否相同,并找出差异数据?    分析:由于表结构中字段比较多,手工比较很浪费时间,而且不能保证不出错误.对于 ...

  7. iBeacon

    iBeacon[1] 是苹果公司2013年9月发布的移动设备用OS(iOS7)上配备的新功能.其工作方式是,配备有 低功耗蓝牙(BLE)通信功能的设备使用BLE技术向周围发送自己特有的ID,接收到该I ...

  8. Android中SurfaceView的使用详解

    Android中SurfaceView的使用详解 http://blog.csdn.net/listening_music/article/details/6860786 Android NDK开发 ...

  9. CentOS 关闭蜂鸣

    临时:sudo rmmod pcspkr 永久 /etc/inputrc文件中把 set bell-style none 前的注释去掉,改为 set bell-style off 转自:http:// ...

  10. spring mvc 拦截器

    拦截器作用:可以用于用户操作的安全检查,如:登录.权限等 package com.tool; import java.util.List; import javax.servlet.http.Http ...