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.
  • Use conditions
  • Equivalence TableSelect
  • Value of the selected element
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
Returns the index of the selected element in the Table or TreeView Table control. This index can correspond to:
  • the number of the selected row. The selected row corresponds to the current row on which the selection bar is displayed.
  • Versions 16 and later
    the number of the selected column if the control allows the selection mode by column. This option can be configured in the "UI" tab of the control description.
    New in version 16
    the number of the selected column if the control allows the selection mode by column. This option can be configured in the "UI" tab of the control description.
    the number of the selected column if the control allows the selection mode by column. This option can be configured in the "UI" tab of the control description.
  • Versions 16 and later
    the number of the selected cell if the controls allows the selection mode by cell. This option can be configured in the "UI" tab of the control description.
    New in version 16
    the number of the selected cell if the controls allows the selection mode by cell. This option can be configured in the "UI" tab of the control description.
    the number of the selected cell if the controls allows the selection mode by cell. This option can be configured in the "UI" tab of the control description.
  • Versions 16 and later
    the column number of the selected cell if the controls allows the selection mode by cell. This option can be configured in the "UI" tab of the control description.
    New in version 16
    the column number of the selected cell if the controls allows the selection mode by cell. This option can be configured in the "UI" tab of the control description.
    the column number of the selected cell if the controls allows the selection mode by cell. This option can be configured in the "UI" tab of the control description.
Versions 16 and later
Linux This function is now available for WINDEV applications in Linux.
New in version 16
Linux This function is now available for WINDEV applications in Linux.
Linux This function is now available for WINDEV applications in Linux.
Versions 18 and later
WEBDEV - Server codePHP This function can now be used to handle TreeView Table controls in WEBDEV and PHP sites.
New in version 18
WEBDEV - Server codePHP This function can now be used to handle TreeView Table controls in WEBDEV and PHP sites.
WEBDEV - Server codePHP This function can now be used to handle TreeView Table controls in WEBDEV and PHP sites.
Versions 19 and later
WEBDEV - Browser code This function is now available in Browser code for Table controls in browser mode.
New in version 19
WEBDEV - Browser code This function is now available in Browser code for Table controls in browser mode.
WEBDEV - Browser code This function is now available in Browser code for Table controls in browser mode.
Example
// Indice de la ligne sélectionnée dans le champ "TABLE_Produit"
ResSelect = TableSelect(TABLE_Produit)
// Lignes sélectionnées dans un champ Table mémoire multisélection
FOR i = 1 _TO_ TableSelectCount(TABLE_TABLE1)
Trace("Elément sélectionné: " + TableSelect(TABLE_TABLE1, i))
END
 
// Équivalent à:
// i est un entier
// POUR TOUTE LIGNE SELECTIONNEE i DE TABLE_TABLE1
// Trace("Elément sélectionné: " + TableSelect(TABLE_TABLE1, i-1))
// FIN
// Supprimer toutes les lignes sélectionnées dans un champ Table
// Il est également possible d'utiliser la fonction TableSupprimeSelect
i is int
NbSelection is int
NbSelection = TableSelectCount(TABLE_MaTable)
FOR i = NbSelection TO 1 STEP -1
TableDelete(TABLE_MaTable, TableSelect(TABLE_MaTable, i))
END
Syntax
<Result> = TableSelect(<Table control> [, <Rank> [, <Information to return>]])
<Result>: Integer
  • Index of the selected element in the specified Table control,
  • -1 if no element is selected.
<Table control>: Control name
Name of the control to be used. This control can correspond to:
  • a Table control.
  • a TreeView Table control.
If this parameter corresponds to an empty string (""), the control to which the current event belongs is used.
<Rank>: Optional integer
Rank of selection for a multi-selection control. If this parameter is not specified, the index of the first selected row is returned.
For example, to retrieve the first selected element, <Rank> = 1.
To retrieve the second selected element, <Rank> = 2, etc.
WEBDEV - Server codeWEBDEV - Browser codePHP This parameter is not available for the "classic" Table controls.
<Information to return>: Optional Integer constant
Versions 16 and later
Type of information to return:
tsColumn<Result> will correspond to the number of the selected column.
tsCellColumn<Result> will correspond to the column number for the selected cell.
tsRow
(Default value)
<Result> will correspond to the number of the selected row.
tsCellLine<Result> will correspond to the row number for the selected cell.
If this parameter is not specified, the function will return the number of the selected line.
New in version 16
Type of information to return:
tsColumn<Result> will correspond to the number of the selected column.
tsCellColumn<Result> will correspond to the column number for the selected cell.
tsRow
(Default value)
<Result> will correspond to the number of the selected row.
tsCellLine<Result> will correspond to the row number for the selected cell.
If this parameter is not specified, the function will return the number of the selected line.
Type of information to return:
tsColumn<Result> will correspond to the number of the selected column.
tsCellColumn<Result> will correspond to the column number for the selected cell.
tsRow
(Default value)
<Result> will correspond to the number of the selected row.
tsCellLine<Result> will correspond to the row number for the selected cell.
If this parameter is not specified, the function will return the number of the selected line.
Remarks

Use conditions

TableSelect can be used on:
  • a browsing or memory control.
  • a single-selection or multi-selection control. For multi-selection Table controls, you must use TableSelect in a loop to get all the selected rows.
    WEBDEV - Server codePHP Reminder: Multi-selection is not available for Table controls in classic mode.
WEBDEV - Server codePHP This function is available for Table controls in Ajax mode, Table controls in classic mode and TreeView Table controls.
WEBDEV - Browser code This function is available for Table controls in browser mode only.
WEBDEV - Browser code The TreeView Table control is not available.
WEBDEV - Browser code The TreeView Table control is not available.

Equivalence TableSelect

The following syntaxes are equivalent:
Indice est un entier
Indice = <Champ Table>
ou
Indice = TableSelect(<Champ Table>)

Value of the selected element

To retrieve the value of the selected element, the syntax is:
Indice est un entier
Indice = TableSelect(<Champ Table>)
<Valeur de l'élément> = <Champ Table> [Indice]
ou
<Valeur de l'élément> = <Champ Table> [<Champ Table>]
Component: wd270obj.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment