| Styling > Using Cascading Style Sheets > Customizing Table Column Headers and Rows |
Customizing Table Column Headers and Rows |
INDEX
PREVIOUS
NEXT
|
The table component uses a default renderer to render the column header (an instance of IlpTableHeaderRenderer). This renderer is based on the CSS configuration of the business objects, the attributes, and the table component itself.
This section describes the properties used in the CSS configuration and shows how to customize them.
The following table lists the properties used by the JViews TGO default header renderer.
The following example shows you how you can customize the header of the table. It is based on the CSS file located in
<installdir>/samples/table/styling/data/table.css
where <installdir> is the directory where you have installed JViews TGO.
The CSS selectors used to customize the table header are formed by the CSS type attribute and the CSS class <business class name/attribute name>, as illustrated below:
attribute."Alarm/identifier" {
label: "Alarm ID";
toolTipText: "Alarm identifier";
preferredWidth: 200;
horizontalAlignment: Center;
iconVisible: false;
}
attribute."Alarm/creationTime" {
label: "Created";
toolTipText: "Creation time";
preferredWidth: 250;
sortingMode: DESCENDING;
}
The CSS selectors used to customize the table header are formed by the CSS type attribute and the CSS class <business class name/attribute name>, as illustrated in the example above. However, you can use the * wildcard to indicate that multiple attributes of a given business class should be configured using a single selector.
The following example illustrates how you can configure all the columns of the Alarm business class to have a specific horizontal alignment and icon visibility:
attribute."Alarm/*" {
horizontalAlignment: Center;
iconVisible: false;
}
The following property controls the order of columns in a table:
The order of the columns in a table is associated with the business class that is represented. The CSS selectors used to customize this accepted class are formed by the CSS type object and the CSS class <business class name>, as illustrated below:
object."Alarm" {
tableColumnOrder: "identifier, creationTime, acknowledged, perceivedSeverity";
}
The following property controls the height of rows in a table:
CSS Property |
Type of Value |
Default |
Usage |
|---|---|---|---|
tableRowHeight | Integer | 16 |
Defines the row height for the business class represented in the table. |
The height of rows in a table is associated with the business class that is represented. The CSS selectors used to customize this accepted class are formed by the CSS type object and the CSS class <business class name>, as illustrated below:
object."ilog.tgo.model.IltLink" {
tableRowHeight: 27;
}
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. All rights reserved. Legal terms. | PREVIOUS NEXT |