1. 程式人生 > >Ext grid 渲染

Ext grid 渲染

// 單元格字型顏色渲染
function renderer_Meta_useStatus(value, cellmeta, record,rowIndex, columnIndex, store){
  var color = "";
  if("空閒"==value){
      color = "green";
  }else if("佔用"==value){
      color = "blue";
  }else if("鎖定"==value){
      color = "#DE8100";
  }

  return "<font style=color:"+color+";font-weight:bold>"+value+"</font>";
}

// 日期截圖年月日
return value.substring(0,10);