Ashutosh Wadhvekar
Ashutosh Wadhvekar

Reputation: 53

how to update row background color dynamically when record is updated?

I have to change background colour of a record after updating Record in ng prime Data table. How to do this task?

<p-dataTable [value]="cars" resizableColumns="true" columnResizeMode="expand">
    <p-column field="vin" header="Vin"></p-column>
    <p-column field="year" header="Year"></p-column>
    <p-column field="brand" header="Brand"></p-column>
    <p-column field="color" header="Color"></p-column>
</p-dataTable>

Upvotes: 3

Views: 465

Answers (1)

Nitin Wahale
Nitin Wahale

Reputation: 1696

Ashutosh you should try this attribute of datatable [rowStyleClass]="lookupRowStyleClass"

use following link to add this in your code click here

Upvotes: 3

Related Questions