easyui 通过判断修改单独行的样式

来源:互联网 发布:mysql语句大全例子 编辑:程序博客网 时间:2024/06/05 22:39
$('#id').datagrid({    
   rowStyler:function(index,row){    
       if (row.rate>1){                //通过判断行的某个属性值 ,给row加载单独的样式
           return 'color:#f22e2e;font-size:12px;';    
       }else{
        return 'color:#333333;font-size:12px;';
       }    
   }    
});