Show TOC

 Table Properties and EventsLocate this document in the navigation structure

A Table represents a two-dimensional data set arranged in rows and columns. A Table UI element is built of TableColumns. You define the content of a Table with the dataSource property,the TableColumns have TableCellEditors you must bind to the attributes of the context node to which dataSource is bound to.

Description of UI Element Properties
  • accessibilityDescription

    When accessibility is activated, the assigned text is added to the tooltip . This description provides semantic details of the UI element and is only read by the screen reader if the user focuses the complete Ul element.

  • activateAccessKey

    This indicates whether the access key for this control is activated. More information: Enabling Access Keys

  • compatibilityMode

    This property allows application developers to adapt applications to changed behavior in a new Release. compatibilityMode is represented by enumeration type WDTableCompatibilityMode and can have the following values:

    auto

    Specifies the behavior of the table according to the release in which the application was created.

    nw04Plus

    The behavior of the table is the standard behavior for releases after NW04.

  • dataSource

    You use this property to specify the data source. To do this, you need to specify the path to the context node that provides the data.

  • defaultButtonId

    This specifies the ID of the assigned default button.

  • design

    This determines the appearance of the table. The property design can have the following values and is represented by enumeration type WDTableDesign .

    alternating

    The table rows are displayed alternately in a different color.

    standard

    The table background has one color. The individual table rows are displayed with grid net lines.

    transparent

    Transparent cell background The value of gridMode is ignored

    transparentWithGrid

    Transparent cell background for table. The value of gridMode is taken into consideration.

  • displayEmptyRows

    This specifies whether empty rows are displayed depending on the value specified for visibleRowCount .

  • dropOnRowName

    If the user drops something directly onto an existing table row, this property specifies the name of the relevant DropOnRowTargetInfo. A DropOnRowTargetInfo element must be available for the Table. More Information: Implementing Drag and Drop .

  • emptyTableText

    This specifies the text to be displayed if the rows in the table are empty. If you do not enter a text here, a standard text will be displayed if property visibleRowCount is -1.

  • firstVisibleRow

    This specifies which row of the table is displayed as the first row.

  • firstVisibleScrollableCol

    This specifies the ID of the first horizontally scrollable column after all fixed columns.

  • fixedTableLayout

    This specifies whether the table adheres to the layout restrictions. When this is set to true , the content of the row will be cut off if it is longer than the allowed width.

  • footerVisible

    This specifies whether a footer is displayed.

  • gridMode

    This specifies if and how a border is displayed. gridMode is of enumeration type WDTableGridMode and can have the following values:

    both

    Horizontal and vertical borders are displayed

    none

    No borders are displayed

    vertical

    Only vertical borders are displayed

    horizontal

    Only horizontal borders are displayed

    The default setting is both .

  • handleHotkeys

    This specifies whether this Table acts as a separate container for hotkeys. If this property is set to true, all hot keys defined by UI elements within this table will be handled by this table. It defines a new scope for hot keys. By default, this property is set to false, which means hot keys will be propagated to a parent container. More information: Implementing Hot Keys

  • legendId

    This specifies the ID of the assigned legend.

  • multiColSorting

    This specifies whether the option to define more than one table column as sort criteria is enabled.

  • readOnly

    This specifies whether or not the table can be edited. If this is set to true , the data in the table cannot be edited.

  • rowSelectable

    This specifies whether or not a row can be selected.

  • scrollableColCount

    This specifies the number of visible scrollable columns. If this is set to -1, all columns will be displayed.

  • selectedPopin

    This specifies the selected TablePopin.

  • selectionChangeBehaviour

    Changes to the lead selection can cause loss of data- for example, if the changed or new data was not written to the context due to syntax errors. You can avoid this using the selectionChangeBehaviour property before lead selection is changed: This property is represented by enumeration type WDTableSelectionChangeBehaviour and can have the following values:

    auto

    Specifies that the UI element automatically changes the lead selection after an interaction by the user before the corresponding event is triggered. 

    manual

    Specifies that the UI element does not change the lead selection after an interaction by the user but triggers the corresponding event. In this case, the event handler must change the lead selection to enable the UI element to display the data. This setting allows you to check changes made to the lead selection.

    ifNoLoss

    Specifies that the lead selection only changes if all user entries are written to the context. The lead selection is then changed automatically, and the corresponding event is triggered. Otherwise, the event is triggered, but the lead selection is not changed.

  • selectionMode

    Specifies how the table rows can be selected. Normally, the way table rows are selected Is specified by the definition of the context node. However, you can change the selection using the selectio nMode property. The selectionMode property is represented by the enumeration type WDTableSelectionMode and can take the following values:

    auto

    The selection mode is determined automatically by data binding.

    multi

    Multiple table rows can be selected if the context node allows multiple selection.

    none

    No selection possible

    single

    Only one row can be selected at a time.

    multiNoLead

    Multiple rows can be selected, a lead selection is not displayed.

    Note If you assign the single value to the selectionMode property, you can only select one row at a time, even if multiple is defined for the context node.
  • visibleRowCount

    Specifies the number of table rows that can be displayed without the user needing to scroll.

    Note  

    The value -1 is deprecated. Use displayEmptyRows = false and specify a maximum value of visible rows in visibleRowCount .

  • width

    Specifies the width of the table and can be entered in relative CSS units like em, ex, or percentage.

Properties Overview

Name

Interface

Type

Initial Value

Bindable

accessibilityDescription

IWDTable

String

 

bindable

activateAccessKey

IWDTable

boolean

false

not bindable

compatibilityMode

IWDTable

WDTableCompatibilityMode

auto

bindable

dataSource

IWDTable

Object

 

bindable_mandatory

defaultButtonId

IWDTable

String

 

bindable

design

IWDTable

WDTableDesign

standard

bindable

displayEmptyRows

IWDTable

boolean

true

bindable

dropOnRowName

IWDTable

String

 

bindable

emptyTableText

IWDTable

String

 

bindable

firstVisibleRow

IWDTable

int

0

bindable

firstVisibleScrollableCol

IWDTable

String

 

bindable

fixedTableLayout

IWDTable

boolean

false

bindable

footerVisible

IWDTable

boolean

true

bindable

gridMode

IWDTable

WDTableGridMode

both

bindable

handleHotkeys

IWDTable

boolean

false

not bindable

legendId

IWDTable

String

 

bindable

multiColSorting

IWDTable

boolean

false

bindable

readOnly

IWDTable

boolean

false

bindable

rowSelectable

IWDTable

boolean

true

bindable

scrollableColCount

IWDTable

int

-1

bindable

selectedPopin

IWDTable

String

 

bindable

selectionChangeBehaviour

IWDTable

WDTableSelectionChangeBehaviour

auto

not_bindable

selectionMode

IWDTable

WDTableSelectionMode

auto

bindable

visibleRowCount

IWDTable

int

5

bindable

width

IWDTable

String

 

bindable

More information: Common UI Element Properties

Events
  • onColSelect (String col)

    This event is triggered when the user clicks a table column header. The parameter is the selected column.

  • onFilter

    Event on Filter is triggered if the filter symbol  is selected in the upper left table corner.

  • onLeadSelect (String col, String newRowElement, String oldRowElement, int row)

    Event onLeadSelect is triggered if the lead selection for the table changes. The parameters are:

    • col : The ID of the selected column.
    • newRowElement : The path to the node element representing the selected row (that is, the one the user has just chosen). Note that, depending on the table's selection change behavior, this might not yet be the element for the current lead selection of the data source. This parameter replaces the index based "row" parameter for hierarchical tables where a row cannot be adequately represented by an index, but only by its associated node element. Nevertheless it can -and should - be used for "flat" tables, too.
    • oldRowElement : The path to the node element representing the selected row (that is,  the one that was selected before the user's interaction). Note that, depending on the table's selection change behavior, this might still be the element for the current lead selection of the at the data source.
    • row . This property is deprecated. Use the parameter newRowElement instead.
      Note

      For performance reasons the onLeadSelect event should only be used if especially the lead selection change is relevant.

  • onSelect (String newLeadSelection, String oldLeadSelection)

    This event is triggered whenever the user changes the single selection, multiple selection or lead selection.

    Note

    It's not possible to use onSelect and onLeadSelect in parallel.

  • onSort (String col, WDTableColumnSortDirection direction, boolean multiple)

    Event onSort is triggered if the user clicks the sort icon in a column header.

    Parameters are:

    • col : The ID of the column to be sorted.
    • direction : The direction in which the sorting has been requested.
    • multiple : Indicates whether the supplied column should be sorted in addition to the previously existing sort.
  • onDrop(String data, String mimeType, int offset, String rowElement, String tags)

    This event is triggered when the user drops an object onto this Table. The parameters are:

    • data : The data specified for the drag source.
    • mimeType : The mime type specified for the drag source.
    • offset : The position relative to the rowElement , the user has dropped the object onto.
      • -1: just above the item specified by rowElement
      • 0: right onto the item specified by rowElement
      • +1: just below the item specified by rowElement .
    • rowElement : This row is described by a path to the node element representing it. Declare an action and event handler parameter of type IWDNodeElement (or one of your own node element classes) along with a suitable parameter mapping. Then the path will be automatically transformed into a node element instance.

      Note: When the table is empty at the time of the drop, the offset will be 0 and the rowElement will be NULL

    • tags : the tags defined for the drag source