采用formatter


 

 

YAHOO.widget.DataTable.Formatter.changeLight=function(elCell, oRecord, oColumn, oData){
      elCell.innerHTML = "<img src='../MonitorManage/images/gray_lamp.png'>";
};

{key:"ONLINESTATUS", label:"状态",width:30,resizeable:true,sortable:true,formatter:"changeLight"},

 

 

 

js操作


 

通过获取到行记录的id然后操作

 

var records = myTable.getRecordSet().getRecords();
var  i, len,id;
for(i=0,len=records .length; i<len; i++){
   id = records[i].getId();
   if(...){
       $("#"+id).attr('style','background:#FF9797;');
      
       }
            
}

 

 

 

相关文章:

  • 2021-12-12
  • 2021-06-24
  • 2022-02-25
  • 2021-08-01
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-28
  • 2022-12-23
  • 2021-07-05
  • 2022-12-23
  • 2022-01-20
相关资源
相似解决方案