Row based styling for Primeng DataTable using Angualr 2,4

------------------------------------Component.Html----------------
<p-dataTable id="Tbl" [rowStyleClass]="FunctionName"> </p-dataTable>


-----------------------------------.Compoent.ts---------------------------
FunctionName(rowData) {
return rowData['Status'] == "COMPLETE" ? 'disabled-account-row' : '';
}


----------------------------.Component.css---------------------------------
.disabled-account-row {
/* TODO: first try this without '!important', but you might need it */
background: lightgreen !important;
}

Post a Comment

0 Comments