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  隔行变色_其他_02








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

为人:谦逊、激情、博学、审问、慎思、明辨、 笃行
学问:纸上得来终觉浅,绝知此事要躬行
为事:工欲善其事,必先利其器。
转载请标注出处!