EasyUI中DataGrid隔行改变背景颜色。

摘要:
˂tableid=“dg”class=“easyui datagrid”style=“1000px;height:300px”数据选项=“行号:true,onClickRow:ClickRow,singleSelect:false,border:true,分页:true,url:'DataGridDataHandler.ashx',˂%-//
       <table id="dg" class="easyui-datagrid" style=" 1000px; height: 300px" 
            data-options="
            rownumbers:true,
            onClickRow:ClickRow,
            singleSelect:false,
            border:true,
            pagination:true,
            url:'DataGridDataHandler.ashx',
           <%-- //隔行变色--%>
            rowStyler: function(index,row){
                    if ((index % 2)==0){
                        return 'background-color:#0000C6;color:#fff;font-weight:bold;';
                    }
                else{
                      return 'background-color:#009100;color:#fff;font-weight:bold;';
                }
                },
            toolbar:'#tb'">  

免责声明:文章转载自《EasyUI中DataGrid隔行改变背景颜色。》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇OpenCV_Python —— (6)图像色彩空间nginx配置反向代理示例下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

easyui中datagrid自带loading效果

1.最近在做项目的时候,数据表格中的列名也是动态,后台会将列名和数据一起返回给前台,这样,easyui中的datagrid中自带的loading效果将不再生效,所以自己写了一个easyui的loading插件(效果和datagrid 效果加载一样)  插件代码如下: // loading_line插件 ;(function($){ 'use str...

CSS(八)-- 变形(过渡、动画、平移、旋转、缩放)

目录 1.过渡(transition) 1.1transition-property:指定执行过渡的属性 1.2transition-duration:执行过渡需要的时间 1.3transition-timing-function:过得的时序函数 通过贝塞尔曲线指定 steps()分步执行过渡效果 1.4 transition-delay:过...

分析各种Android设备屏幕分辨率与适配

一. 数据采集    源码GitHub地址 :  -- SSH : git@github.com:han1202012/DisplayTest.git; -- HTTP : https://github.com/han1202012/DisplayTest;   . 使用下面的程序运行在不同设备上 :   package shuliang.han.dis...

[WPF] VisualBrush 中的布局

今天插一篇随笔。说一说上周五遇到的一个布局问题,问题大概是这样的:需要在一个快区域上添加一张透明的背景图片,由于区域较大、并且宽高都不是固定大小,图片较小 所以图片需要居中显示。除此之外还需要在图片的透明部分添加一个非透明的纯色。 比如:最终的效果图、如下图所示: 当然如果只是为了实现这种效果、实现方案有多种,至少有三大类: 1、嵌套两个控件、分别应用纯色...

(转)EasyUI 分页总结

最近用到了easyui的分页和搜索栏功能,使用过程中由于运用不熟练导致其间也出现过一些问题,下面做个小结,供大家共同学习。1.首先使用EasyUI 的DataGrid分页,得加载其js类库:<link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes...

jQuery 菜单项切换

<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style> ul { list-style: none; padding: 0; ma...