easyui datagrid  隔行变色


一:实现样图

easyui datagrid  隔行变色

二:实现代码

  1 $('#dataGrid').datagrid({
  2 	    rowStyler:function(index,row){
  3 	        if (row.adjust_typename=="小计"){
  4 	            return 'background-color:#D7FFEE;';
  5 	        }else{
  6 	        	 //任务完成100%,1 并且已审核通过,背景色置灰  
  7                 if(row.rownum_ % 2 != 0){
  8                     return 'background-color:#d9d9c2;';
  9                 }
 10 	        }
 11 	    }
 12 	});

或者用官方提供的属性值:

easyui datagrid  隔行变色








——————————————————————————————————————————————————————————————————————————

相关文章: