I use http://bootstrap-table.wenzhixin.net.cn/
Need an example of how to change of the class of the table row in function of custom field value
I use this for single cell
cellStyle: function(value){
if(value=='0'){
return { classes: 'success' };
}else{
return { classes: 'danger' };
}
},
Thanks in advance
first parameter in rowStyle
function is data object for current row. You can simple check property for that output in Read
column and return needed classes.
function rowStyle(row, index) {
if(row.Read = 100){ // possibly you map another property, it depends on your setting.
return {classes : "neededClass" }
}
return {};
}
sample JS fiddle with test data