PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Overview
  • Initial status of Table control
  • Details of display options
  • Selection mode
  • Display options of columns
  • Scrollbars in a Table control
  • Options kept for backward compatibility with the earlier versions
  • Forcing the title to be single-line
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
The Table control is used to display and/or type information. This information can come from a data source, from a WLanguage variable, or it can be stored.
This help page presents the main characteristics that can be defined for a Table control found in a window:
You also have the ability to define the data source displayed in the control. For more details, see Content of Table control.
Versions 20 and later
Android The Table control is now available for Android applications.
iPhone/iPad The Table control is now available for iPhone/iPad applications.
New in version 20
Android The Table control is now available for Android applications.
iPhone/iPad The Table control is now available for iPhone/iPad applications.
Android The Table control is now available for Android applications.
iPhone/iPad The Table control is now available for iPhone/iPad applications.
Initial status of Table control
The initial status of a Table control can be:
Initial status of Table control
This initial status is defined when creating the control and it can be modified at any time in the "UI" tab of the characteristics of Table control.
The different possibilities are as follows:
  • Visible: The Table control will be visible or not. This option can be modified by programming with Visible.
  • Editable: The user will be able to perform an input in the control columns if these columns are in edit.
    iPhone/iPad The Table control is not available in edit. It is available in read-only.
  • Selection (without edit): The user will not be able to perform an input in the control columns. A control row can be selected:
    • by clicking this row.
    • by using TableSelectPlus.
      The row will be selected via the selection bar.
      Remark: The value of Table control corresponds to the selected row. The code for row selection is run for each selection.
  • No edit, no selection: The user will not be able to perform an input in the control columns. A control row can only be selected by programming with TableSelectPlus. This row will be selected via the selection bar. The user will not be able to modify the position of the selection bar.
    Remark: The value of Table control corresponds to the selected row.
    Tip: This option is recommended when a row must be highlighted via the selection bar.
  • Grayed: The Table control and its columns will be grayed. The user will not be able to enter information in the control.
Details of display options
Versions 16 and later

Selection mode

The selection modes define how the different elements of Table control (row, column, cell) can be selected by the user or through programming. This selection mode is defined when creating the control. It can be modified at any time in the "UI" tab of the characteristics of Table control.
The available selection modes are as follows:
Selection modes
  • No selection: No selection bar will be displayed, however the selected row, column or cell will have focus (it will be bordered by dots). A row, a column or a cell can be selected by a click on this element or by programming.
  • Single selection: The selected row, column or cell will be displayed underneath the selection bar. A row, a column or a cell can be selected by a click on this element or by programming.
  • Multi-selection: Several rows, columns or cells of the Table control can be selected at the same time:
    • with the Shift key if the rows, columns or cells are consecutive or with the Ctrl key if the elements are not consecutive.
    • through programming.
      In this case, the number of selection bars will be equal to the number of selected elements.
Remarks:
  • A WLanguage error will occur if you try to perform a multiple selection by programming while the selection mode is set to "Simple selection".
  • During a multiple selection by cell, to select a row, all the cells found in the row must be selected. To simplify this operation, you have the ability to display a row picker ("Style" tab, "Row picker" element, "Picker" option corresponding to "Left arrow").
The selected elements will be retrieved:
  • with TableSelect. The tsRow, tsColumn, tsCellLine and tsCellColumn constants are used to respectively retrieve information about the rows, the columns and the cells.
  • by TableSelectCount. The tsRow, tsColumn, tsCellLine and tsCellColumn constants are used to respectively retrieve the number of rows, columns and cells.
Example: The following example is used to retrieve detailed statistics for the selected cells in the Table control.
// Récupération du nombre de cellules sélectionnées
NbSelectionne is int
NbSelectionne = TableSelectCount(TABLE_StatsFiliales, tsCell)
// Parcours des cellules sélectionnées
FOR i = 1 _TO_ NbSelectionne
// Récupération de la ligne et de la colonne
nLigne = TableSelect(TABLE_StatsFiliales, i, tsCellLine)
nColonne = TableSelect(TABLE_StatsFiliales, i, tsCellColumn)
// Traitement
...
END

AndroidiPhone/iPad Only the selection mode of rows is available.
New in version 16

Selection mode

The selection modes define how the different elements of Table control (row, column, cell) can be selected by the user or through programming. This selection mode is defined when creating the control. It can be modified at any time in the "UI" tab of the characteristics of Table control.
The available selection modes are as follows:
Selection modes
  • No selection: No selection bar will be displayed, however the selected row, column or cell will have focus (it will be bordered by dots). A row, a column or a cell can be selected by a click on this element or by programming.
  • Single selection: The selected row, column or cell will be displayed underneath the selection bar. A row, a column or a cell can be selected by a click on this element or by programming.
  • Multi-selection: Several rows, columns or cells of the Table control can be selected at the same time:
    • with the Shift key if the rows, columns or cells are consecutive or with the Ctrl key if the elements are not consecutive.
    • through programming.
      In this case, the number of selection bars will be equal to the number of selected elements.
Remarks:
  • A WLanguage error will occur if you try to perform a multiple selection by programming while the selection mode is set to "Simple selection".
  • During a multiple selection by cell, to select a row, all the cells found in the row must be selected. To simplify this operation, you have the ability to display a row picker ("Style" tab, "Row picker" element, "Picker" option corresponding to "Left arrow").
The selected elements will be retrieved:
  • with TableSelect. The tsRow, tsColumn, tsCellLine and tsCellColumn constants are used to respectively retrieve information about the rows, the columns and the cells.
  • by TableSelectCount. The tsRow, tsColumn, tsCellLine and tsCellColumn constants are used to respectively retrieve the number of rows, columns and cells.
Example: The following example is used to retrieve detailed statistics for the selected cells in the Table control.
// Récupération du nombre de cellules sélectionnées
NbSelectionne is int
NbSelectionne = TableSelectCount(TABLE_StatsFiliales, tsCell)
// Parcours des cellules sélectionnées
FOR i = 1 _TO_ NbSelectionne
// Récupération de la ligne et de la colonne
nLigne = TableSelect(TABLE_StatsFiliales, i, tsCellLine)
nColonne = TableSelect(TABLE_StatsFiliales, i, tsCellColumn)
// Traitement
...
END

AndroidiPhone/iPad Only the selection mode of rows is available.

Selection mode

The selection modes define how the different elements of Table control (row, column, cell) can be selected by the user or through programming. This selection mode is defined when creating the control. It can be modified at any time in the "UI" tab of the characteristics of Table control.
The available selection modes are as follows:
Selection modes
  • No selection: No selection bar will be displayed, however the selected row, column or cell will have focus (it will be bordered by dots). A row, a column or a cell can be selected by a click on this element or by programming.
  • Single selection: The selected row, column or cell will be displayed underneath the selection bar. A row, a column or a cell can be selected by a click on this element or by programming.
  • Multi-selection: Several rows, columns or cells of the Table control can be selected at the same time:
    • with the Shift key if the rows, columns or cells are consecutive or with the Ctrl key if the elements are not consecutive.
    • through programming.
      In this case, the number of selection bars will be equal to the number of selected elements.
Remarks:
  • A WLanguage error will occur if you try to perform a multiple selection by programming while the selection mode is set to "Simple selection".
  • During a multiple selection by cell, to select a row, all the cells found in the row must be selected. To simplify this operation, you have the ability to display a row picker ("Style" tab, "Row picker" element, "Picker" option corresponding to "Left arrow").
The selected elements will be retrieved:
  • with TableSelect. The tsRow, tsColumn, tsCellLine and tsCellColumn constants are used to respectively retrieve information about the rows, the columns and the cells.
  • by TableSelectCount. The tsRow, tsColumn, tsCellLine and tsCellColumn constants are used to respectively retrieve the number of rows, columns and cells.
Example: The following example is used to retrieve detailed statistics for the selected cells in the Table control.
// Récupération du nombre de cellules sélectionnées
NbSelectionne is int
NbSelectionne = TableSelectCount(TABLE_StatsFiliales, tsCell)
// Parcours des cellules sélectionnées
FOR i = 1 _TO_ NbSelectionne
// Récupération de la ligne et de la colonne
nLigne = TableSelect(TABLE_StatsFiliales, i, tsCellLine)
nColonne = TableSelect(TABLE_StatsFiliales, i, tsCellColumn)
// Traitement
...
END

AndroidiPhone/iPad Only the selection mode of rows is available.

Display options of columns

Several options are available for configuring the display of columns. These options are available in the "Details" tab of the description window of the Table control.
Display options of columns
The column titles are multiline by default. The height of header is automatically adjusted to the number of rows. The titles of columns support the RTF format.
Remarks:
  • Versions 18 and later
    AndroidiPhone/iPad You have the ability to define title-headers of columns. A title-header of columns is an additional title displayed above the title of one or more columns.
    New in version 18
    AndroidiPhone/iPad You have the ability to define title-headers of columns. A title-header of columns is an additional title displayed above the title of one or more columns.
    AndroidiPhone/iPad You have the ability to define title-headers of columns. A title-header of columns is an additional title displayed above the title of one or more columns.
For more details, see Managing the titles of columns in a Table control.
Scrollbars in a Table control
Options kept for backward compatibility with the earlier versions

Forcing the title to be single-line

By default, the title of columns found in a Table control is multiline. The option "Force title in a singleline (8)" allows you to go back to the default behavior of version 8.
On the Table controls created with version 8 (or earlier), this option must be unchecked in order to get a multiline column title.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment