ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Table functions
  • Use conditions
  • Characteristics of the row elements
  • Table field/Hierarchical file table: Changes to the linked data file
  • Changes in a Table or TreeView Table control based on a data file
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Modifies a row in:
  • a Table control,
  • a TreeView Table control.
Example
// Modification des éléments "Paul" et "Dubois" 
// de la cinquième ligne du champ Table "TABLE_TableClient"
TABLE_TableClient.ModifieLigne(5, "Paul", "Dubois")
Syntax
<Table control>.ModifyRow(<Index> [, <Element column 1> [... [, <Element column N>]]])
<Table control>: Control name
Name of the control to be used. This control can correspond to:
  • a Table control.
  • a TreeView Table control.
<Index>: Integer
Index of the row to be modified. The index of the first row is set to 1.
Index equal to -1The current row is modified. No effect if no row is selected.
Index greater than the number of control rowsA WLanguage error occurs.
<Element column 1>: Optional character string
First element of the modified row. The value of this element replaces the existing value. Each element corresponds to a column. Each type of modified element must be compatible with the type of relevant column.
If none of the <Element column X> parameters are specified, <Table>.ModifyLine has no effect.
<Element column N>: Optional character string
Nth element of the modified row. The value of this element replaces the existing value. Each element corresponds to a column. Each type of modified element must be compatible with the type of relevant column.
If none of the <Element column X> parameters are specified, <Table>.ModifyLine has no effect.
Remarks

Use conditions

<Table>.ModifyLine can be used on:
  • Table or TreeView Table controls based on a data file.
  • Table or TreeView Table controls populated programmatically.
  • single-selection or multi-selection controls.
    WEBDEV - Server codePHP Reminder Multi-selection is not available for Table control fields in "Server" mode.
WEBDEV - Server codePHP This function is available for Table controls in "Server" and "Server + AJAX" mode, and for 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.

Characteristics of the row elements

  • To modify the value of an element in a row, use the following syntax:
    TableControl.ColumnName[RowIndex] = NewValue
  • If an element corresponds to the result of a calculation, enclose the numerical expression in brackets.
    For example:
    TABLE_TableCalcul.ModifieLigne((53+29),(83-21))
WEBDEV - Server codePHP

Table field/Hierarchical file table: Changes to the linked data file

  • If the cascading input is enabled, the data file linked to the control is automatically modified when the user goes to the next row.
  • If the cascading input is not enabled, the data file linked to the control is not modified. To write the content of the modified row to the linked data file, <Table>.Save must be used after <Table>.ModifyLine.
Remarks:
  • The "Cascading input" option can be selected in the "Details" tab of the control description.
  • WEBDEV - Server code Cascading input is only available on Table control Ajax file fields.

Changes in a Table or TreeView Table control based on a data file

To modify a row in a Table or TreeView Table control based on a data file, we advise you to:
Component: wd300obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/18/2024

Send a report | Local help