2020.1

Table Of Contents
l
Switch to Source view.
l Add the data-keep-when-empty attribute to the respective <tr> element(s). For
example:
<tr data-repeat="Instruments" data-keep-when-empty="">.
Tip
To locate a row you can select it on the "Outline pane" on page1033.
Styling a Dynamic Table
The Insert Dynamic Table wizard lets you select a style for the table.
Tables are styled via CSS: when the wizard adds a Table, the chosen theme's class is added
to the <table> element, and, if it doesn't exist yet, the default_table_styles.css file is added to
the resources of the template. This CSS file contains the CSS rules for all table themes. (See:
"Styling templates with CSS files" on page719.)
To change the theme, you could simply select the table and change its class on the "Attributes
pane" on page1024.
The available theme classes are: table--grid, table--colgrid, table--minimalist, table--dark, table-
-light, table--striped, table--topbar, table--portfolio. (Note the double dash in the class name.)
The default_table_styles.css file is read-only, but of course you could overwrite styles and
create your own theme, using your own style sheets.
Regardless, you can change the font, font size and color, the borders, the cell padding (the
distance between the edge of the cell and its content), and the background color or image of the
table and its cells, via the Formatting dialog.
Both approaches are explained in the topic: "Styling a table" on page740.
Dynamic Tables are best styled via CSS (see "Via a style sheet" on page742), for two reasons:
l With local formatting, all rows that are added on the fly (in Preview mode and in output)
will look exactly the same as the first one. Alternating row colors, for example, in
dynamically added rows can only be done via CSS.
Page 804