|
|
|
|
|
- Use conditions
- Row characteristics
- Table or TreeView Table control based on a data file: Modifications in the linked data file
- Changes in a Table or TreeView Table control based on a data file
- Modifying a record in a Table control based on a data file and releasing a Trigger
- TableModify function and Modified property
TableModify (Function) In french: TableModifie Modifies a row in: - a Table control,
- a TreeView Table control,
a table displayed in a Combo Box control.
- TAB characters into the columns,
- all types of values into the columns.
// Modify the "Paul" and "Moore" elements on the fifth // row of the "TABLE_CustomerTable" control TableModify(TABLE_CustomerTable, "Paul" + TAB + "Moore", 5)
// Modification in a column of a Table control TableModify(COL_LASTNAME, "Moore", 5)
Syntax
TableModify(<Table control> , <Row> [, <Index>])
<Table control>: Control name Name of the control to be used. This control can correspond to: - a Table control.
- a TreeView Table control.
a Combo Box control with table. If this parameter corresponds to an empty string (""), the control used will be the control to which the current event belongs. <Row>: Character string Modified row replacing the specified row. This row has the following format:
<Element of column 1> + TAB + <Element of column 2> + TAB + ... <Index>: Optional integer Index of the row to be modified. The value of first row is set to 1. | | Index not specified or equal to -1 | The current row is modified. This constant has no effect if no row is selected. | Index greater than the number of control rows | A WLanguage error occurs. |
Remarks Use conditions TableModify can be used on: - a Table or TreeView Table control based on a data file.
- a Table or TreeView Table control populated programmatically.
- a single-selection or multi-selection control.
![WEBDEV - Server code WEBDEV - Server code](https://doc.pcsoft.fr/ext/images/us/WBS.png?-1123132264) Reminder: Multiselection is not available for classic Table controls.
Row characteristics - Each row element is changed into the type of the associated column.
- If one of the elements corresponds to an empty string ("") or to 0 (depending on the column type), its value will be overwritten.
For example:
TableModify(TABLE_CustomerTable, "Moore" + TAB + "Peter" + TAB + "" + ... TAB + "06/21/72")
- If an element corresponds to the calculation result, the numeric expression must be enclosed in brackets.
For example:
TableModify(TABLE_CalcTable, (53+29) + TAB + (83-21))
- To modify the value of an element in a row, use the following syntax:
TableName.ColumnName[RowIndex] = NewValue
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:
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|