0 votes
871 views
in Coach Views by

1 Answer

0 votes
by (30.6k points)

Colours per row or column in the UI Toolkit table are set in its rendering events - the same technique as in questions 3130, 763 and 138:

// rows: Table > Events > On row rendered  (row, record, index)
if (record.status === "OVERDUE") row.style.backgroundColor = "#f2dede";
if (index % 2 === 1) row.classList.add("striped-alt");                // zebra striping when the table style is off

// columns / cells: Column > Render cell  (cell, record, column)
cell.style.color = record.amount < 0 ? "#a94442" : "#3c763d";
if (column.label === "Amount") cell.style.textAlign = "right";

Whole columns without code: give the table a Custom CSS class and style the nth column: .myTable td:nth-child(3), .myTable th:nth-child(3) { background: #fcf8e3; } in a managed CSS asset. Refresh after data changes (${Table}.refresh()) so that the renderers run again. The old Dojo table (Coaches toolkit) only offered per-column style expressions; upgrade to the UI Toolkit table for anything data-driven.

References

Related questions

0 votes
1 answer 1.4k views
0 votes
1 answer 1.1k views
+1 vote
1 answer 1.2k views
0 votes
1 answer 847 views
0 votes
1 answer 4.0k views
0 votes
1 answer 1.7k views
0 votes
1 answer 926 views
0 votes
1 answer 4.1k views
0 votes
1 answer 2.0k views
0 votes
1 answer 1.7k views
0 votes
1 answer 723 views
0 votes
1 answer 722 views

723 questions

807 answers

98 comments

4.9k users

Join BPM Community Discord Channel

Welcome to BPM Tips Q&A, Community wiki/forum where you can ask questions and receive answers from other IBM BPM experts and members of the community. Users with 2000 points will automatically be promoted to expert level.
Created by Dosvak LLC
Our Youtube Channel
...