Hi I'm new with angular 2. I'm using ng2-table. I added to my website table like this. I need to add a color to specific row inside the table. How is that possible ? I tried to add it like the tutorial did with his columns but without success.
ng2-table how to add style to specific row
4.8k views Asked by GroundIns At
2
There are 2 answers
5

Check their style file provided to know what css-class Names are using and try to override them:
E.g. of classes used: table
dataTable
table-striped
table-bordered
CSS:
table.dataTable tbody th, table.dataTable tbody td {
padding: 8px 10px;
background-color: red;
}
Found an answer, taken from here: https://github.com/valor-software/ng2-table/issues/342
We can change te color of the row by adding some style to it like this:
A quick and dirty solution:
Step 1: Integrate jQuery
Step 2: Give your result table an ID like:
Step 3: Modify your onCellClick method: