RE: change color List view (grid) with condition
Check My JS below:
function showEventStatusNew(rowData, userLCID) {
debugger;
if (rowData == null || rowData == 'undefined') return;
// read rowdata
var str = JSON.parse(rowData);
var coldata = str.new_statoevento_Value;
var rowId = str.RowId;
var opened = str.new_opened_Value;
if (coldata == null || coldata == 'undefined' || coldata.length < 1) return;
if (!opened) {
switch (coldata) {
case 2:
$("tr[oid='" + rowId + "']").css('fontWeight', 'bold');
// $('span:contains("Attivo")').parent().parent().css('fontWeight', 'bold');
break;
case 0:
$("tr[oid='" + rowId + "']").css('fontWeight', 'bold');
break;
default:
break;
}
}
}