1
// Row Rendering event
public void Row_Rendering() {
// Enter your code here
}
這裏是我想執行的條件..行渲染事件上表
"SCHD TIME" - is the TIMESTAMP(value) from SQL
if (SCHD_TIME >= 15mins) {
return 'background-color:red; color:#fff'
} else if (SCHD_TIME> 15mins <= 30mins) {
return 'background-color:yellow; color:#000;'
} else if (SCHD_TIME> 30mins <= 2hours) {
return 'background-color:green; color:#fff'
} else if (SCHD_TIME> 2hours) {
return 'background-color:none';
}
或者如果在服務器端執行這個更簡單的方法,請分享謝謝!