Controlling table rendering
Table rendering can be controlled by the use of presentation styles and table attributes.
Table width
TABLE
container is defined by the number of visible
columns in its layout.HIDDEN
will not contribute to
computing the default table width.In this example, the table is defined with three visible columns, which in turn define individual field widths. The sum of the field widths defines the default table width.
GRID
{
<TABLE t1 >
[c1 |c2 |c3 ]
...
WIDTH
attribute:TABLE t1 : table1, WIDTH = 5 COLUMNS, ... ;
COLUMNS
unit means a number of fields/columns in the
TABLE
, not grid-columns.Table height
TABLE
container is by default defined by the number of rows in
its layout. In the example, the default table height will be three
rows:GRID
{
<TABLE t1 >
[c1 |c2 |c3 ]
[c1 |c2 |c3 ]
[c1 |c2 |c3 ]
< >
...
HEIGHT
attribute:TABLE t1 : table1, HEIGHT = 10 LINES, ... ;
LINES
unit means a number of lines in the TABLE
, not
grid-lines.Defining a table with fixed height
By default, tables can be resized in height and behave as a stretchable element in the graphical window.
WANTFIXEDPAGESIZE
form file attribute to prevent table
resizing:TABLE t1 : table1, WANTFIXEDPAGESIZE, ... ;
Current row / current cell rendering
In a TABLE
container, the highlighting of the current row (or current cell, when
focus granularity is at the cell level) can be controlled with style attributes.
SCROLLGRID
containers.For more details, see Row and cell highlighting in TABLE.
Making table columns unmovable
tableType
is set to frozenTable
,
you can define a number of fixed columns on the left and right, respectively with the
leftFrozenColumns
and rightFrozenColumns
style
attributes:<Style name="Table.custom_style">
<StyleAttribute name="tableType" value="frozenTable"/>
<StyleAttribute name="leftFrozenColumns" value="2"/>
<StyleAttribute name="rightFrozenColumns" value="1"/>
</Style>
See the reference topics Table style attributes, Tree style attributes.
Mobile-style list view rendering
TABLE
containers can be rendered with a mobile list view look and feel, by
setting the tableType
style attribute to
"listView"
:<Style name="Table.custom_style">
<StyleAttribute name="tableType" value="listView"/>
</Style>
For the complete list of style attributes, see Table style attributes.
Current row visibility after dialog execution
When the dialog controlling the table has finished, the current row may be deselected, depending
on the KEEP CURRENT ROW
dialog
attribute.