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
  • Deletion in a browsing Table or TreeView Table control
  • Referential integrity and browsing Table or TreeView Table control
  • Deletion in a browsing Table control and Trigger
  • Error management
  • Locking the linked data file
  • Deletion in a memory Table control with a "Contains" filter
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
Deletes a row from:
  • a Table control,
  • a TreeView Table control,
  • WINDEV a table displayed in a Combo Box control.
Versions 22 and later
WINDEV Remark: To delete a row with an animation, use TableDeleteWithAnimation.
New in version 22
WINDEV Remark: To delete a row with an animation, use TableDeleteWithAnimation.
WINDEV Remark: To delete a row with an animation, use TableDeleteWithAnimation.
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.
Versions 20 and later
Android This function is now available for Android applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 20
Android This function is now available for Android applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Android This function is now available for Android applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Example
// Suppression de la ligne 5 dans le champ "TABLE_Produit"
TableDelete(TABLE_Produit, 5)
// Supprimer toutes les lignes sélectionnées dans un champ Table
// A partir de la version 18, la fonction TableSupprimeSelect est disponible
i is int
NbSelection is int = TableSelectCount(TABLE_MaTable)
FOR i = NbSelection TO 1 STEP -1
TableDelete(TABLE_MaTable, TableSelect(TABLE_MaTable, i))
END
Syntax
TableDelete(<Table control> [, <Subscript>])
<Table control>: Control name
Name of the control to be used. This control can correspond to:
  • a Table control.
  • a TreeView Table control.
  • WINDEV a Combo Box control with table.
If this parameter corresponds to an empty string (""), the Table control to which the current event belongs will be used.
<Subscript>: Optional integer
Subscript of row to delete.
If this parameter is not specified, the selected rows are deleted. If this parameter is not specified and if no row is selected, TableDelete has no effect.
Remarks

Use conditions

TableDelete can be used on:
  • a browsing or memory control.
  • a single-selection or multi-selection control.
    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 codeAndroidiPhone/iPad The TreeView Table control is not available.
WEBDEV - Browser code The TreeView Table control is not available.

Deletion in a browsing Table or TreeView Table control

TableDelete deletes the corresponding record from the data file associated with the control. If items are linked to other data files, no modification is automatically performed on these linked data files.

Referential integrity and browsing Table or TreeView Table control

If the management of referential integrity is enabled (HSetIntegrity), HErrorIntegrity must be called after TableDelete to check the integrity.
If an integrity error is detected, the row is not deleted and it remains visible in the control.

Deletion in a browsing Table control and Trigger

You have the ability to activate a trigger when deleting a record from a browsing Table control. For more details, see the documentation about HDescribeTrigger.

Error management

The ErrorOccurred variable is set to True if the deletion fails. To find out the error details, use ErrorInfo.
Example of error cases: Attempt to delete a row whose subscript corresponds to a row not selected in the visible part of Table control.

Locking the linked data file

If the data file is locked in the current process, TableDelete deletes the specified row and unlocks the data file.

Deletion in a memory Table control with a "Contains" filter

TableDelete called on a memory Table control that is using a "Contains" filter triggers the display of records that do not match the filter. The filters defined by the AAFs (Automatic Application Features) are canceled.
Component: wd270obj.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment