Show TOC

Procedure documentationDefining Table Styles Locate this document in the navigation structure

 

You can use styles to change the colors of certain table rows and table cells based on defined conditions. For example, you may want to display a row in red if a quantity is over a certain value, or green if it is below a certain value.

Prerequisites

You have added a table view element to your model.

Procedure

  1. On the Layout board, perform one of the following:

    • Right-click the table whose row styles you want to define and choose Row Styles.

    • Right-click the table column whose cell style you want to define and choose Cell Styles.

    The Define Row Styles or Define Cell Styles dialog box is displayed.

  2. Select the Style 1 text and enter a descriptive name for the style.

  3. In the Condition cell of the first row, you can enter a dynamic expression that defines when to apply the style. To do this, click the Define Expression (Define Expression) button and use the Dynamic Expression Editor dialog box. For more information, see Working with Dynamic Expressions. Alternatively, you can leave the default condition (true) to indicate that the style is always used (not conditional on certain criteria).

  4. In the Row Background or Cell Background cell, choose the color for the row or cell. The results of the options that you select are displayed in the Style cell of the first row.

    Note Note

    The available colors are defined in Web Dynpro themes, and the actual color of each theme item may change at runtime depending on the current Web Dynpro theme definitions.

    End of the note.
  5. Click the Add Style (Add Style) button and repeat steps 2 to 4 to define additional styles, as required.

  6. Use the Move Up (Move Up) and Move Down (Move Down) buttons to modify the order of the styles. At runtime, the first style in the list whose condition returns true is used.

  7. Click OK.

Note Note

If you are defining cell styles, you can click the Define row styles link in the Define Cell Styles dialog box to display the Define Row Styles dialog box and define the row styles, or click the View Row Styles link to display the already-defined row styles.

End of the note.