Home | Sign in | English EN

  • 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
  • Managing errors
  • Locking the linked data file
  • Deletion in a memory Table control with a "Contains" filter
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Stored procedures
Deletes a row from a Table control, from a TreeView Table control (or from a table displayed in a Combo Box control) with an animation. The duration of this animation can be configured:
  • in the "Style" tab of the Table control description window:
    • In the "Style" tab, select the "Control animation" element.
    • In the list of animations, select "Modification by TableXXXWithAnimation()" and click the "Parameters" button.
  • in the description window of the project:
    • In the "Advanced" tab, click "Animations of controls".
    • In the "Table and Looper control" area, select "Modification by TableXXXWithAnimation()" and click the "Parameters" button.
Remark: This function is identical to TableDelete. The only difference is the management of animation.
// Delete row #5 from the "TABLE_Product" control
TableDeleteWithAnimation(TABLE_Product, 5)
// Delete all selected rows from a Table control
i is int
NbSelection is int = TableSelectCount(TABLE_MyTable)
FOR i = NbSelection TO 1 STEP -1
TableDeleteWithAnimation(TABLE_MyTable, TableSelect(TABLE_MyTable, i))
TableDeleteWithAnimation(<Table control> [, <Subscript>])
<Table control>: Control name
Name of control to use. 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 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, TableDeleteWithAnimation has no effect.

Use conditions

TableDeleteWithAnimation can be used on:
  • a browsing or memory control.
  • a single-selection or multiselection control.
The animation is not played in the following cases:
  • if the animations are disabled (AnimationEnabled).
  • if the function is used in the following window events: "Global declarations", "End of initialization" or "Closing".
  • if the application is in TSE mode.
  • if the deletion is performed outside the visible area (below or above). In this case, the deletion is performed and the function gives control back immediately.
The function gives control back at the end of animation only.

Deletion in a browsing Table or TreeView Table control

TableDeleteWithAnimation 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 TableDeleteWithAnimation 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. See the documentation about HDescribeTrigger for more details.

Managing errors

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, TableDeleteWithAnimation deletes the specified row and unlocks the data file.

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

TableDeleteWithAnimation 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 : wd260obj.dll
Minimum version required
  • Version 22
This page is also available for…
Function not working on Windev 25
Not working in version 90f. This happens with all functions related to delete records on tables. Also it only happens with tables filled by files/Queies
26 Nov. 2020
Function not working on 25
I was using this function with the prerelease version 83n (that actually now it is not available to download) then I upload my version to 25 with the final release 90f andnow it is no longer working at all.

Doing more testing it doesn't work either:

When table is working by programming. If you do use this functions with a table filled with file/Query it works just fine.
26 Nov. 2020