AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones Tabla
  • Use conditions
  • Deleting records in a Table or TreeView Table control based on a data file
  • Referential integrity and Table or TreeView Table controls based on a data file
  • Deleting records in a Table control based on a data file and Trigger
  • Handling errors
  • Locking the linked data file
  • Deleting records in a Table control populated programmatically with a "Contains" filter
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
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:
    • On 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:
    • On the "Advanced" tab, click "Animación de controles".
    • In the "Table and Looper control" area, select "Modification by TableXXXWithAnimation()" and click the "Parameters" button.
Note: This function is equivalent to TableDelete. The only difference is the management of animation.
Ejemplo
// 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))
END
Sintaxis
TableDeleteWithAnimation(<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.
  • a Combo Box control with table.
If this parameter is an empty string (""), the Table control of the current event will be used.
<Subscript>: Optional integer
Index of the 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.
Observaciones

Use conditions

TableDeleteWithAnimation 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.
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 "Close"..
  • 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.

Deleting records in a Table or TreeView Table control based on a data file

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 Table or TreeView Table controls based on a data file

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.

Deleting records in a Table control based on a data file and Trigger

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

Handling errors

The ErrorOccurred variable is set to True if the deletion fails. To get the details of the error, use ErrorInfo.
Example of error: Deleting a line whose index corresponds to a non-selected line in the visible part of the 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.

Deleting records in a Table control populated programmatically with a "Contains" filter

When used on a Table control populated programmatically with a "Contains" filter, TableDeleteWithAnimation displays the records that do not match the filter. The filters defined by the AAFs (Automatic Application Features) are canceled.
Componente: wd300obj.dll
Versión mínima requerida
  • Versión 22
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local