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
  • Equivalence between the TableCount function and the Size property
  • Table controls in "Server + AJAX" mode
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
Returns:
  • the number of columns found in a Table or TreeView Table control.
  • or the number of lines in a Table or TreeView Table control field.
Ejemplo
// Nombre de lignes présentes dans le champ "TABLE_Produit"
ResNombreLigne = TableCount(TABLE_Produit)
Sintaxis
<Result> = TableCount(<Table control> [, <Row/Column>])
<Result>: Integer
Number of rows or columns found in the specified control.
<Table control>: Control name
Name of the control to be used. This control can correspond to:
  • a Table control.
  • a TreeView Table control.
If this parameter corresponds to an empty string (""), the control to which the current event belongs will be used.
<Row/Column>: Integer constant (optional)
Used to specify the type of returned result:
  • the toShown, toTotal and toVisible constants contain a number of rows.
  • the toColumn constant contains the number of columns in the control.
Table or TreeView Table control based on a data fileTable or TreeView Table control populated programmatically
toShown
WEBDEV - Código Servidor Default constant for a Table or TreeView Table control based on a data file.
WEBDEV - Código Navegador Constant not available.
Number of non-empty rows visible in the control.
WEBDEV - Código ServidorPHP This constant should not be used for Table controls in "Server + AJAX" mode.
Number of non-empty rows in the visible part of the control.
Remark: Hidden lines (thanks to the Visible property) are still counted.
toColumnNumber of columns found in the control.Number of columns found in the control.
toTotal
(Default value)
WEBDEV - Código ServidorPHP Default constant for a Table control populated programmatically.
  • Total number of records ("Proportional scrollbar" is checked):
    • of the linked file (if there is no filter).
    • filtered of the linked file (if there is a filter).
    • in the query (if the control is linked to a query).
  • Number of visible records if the control includes a scrollbar with an ongoing movement ("Proportional scrollbar" unchecked)Caution: The initialization end code is only executed when the total is calculated..
WEBDEV - Código Servidor Total number of records:
  • of the linked data file (if there is no filter).
  • filtered of the linked file (if there is a filter).
  • in the query (if the control is linked to a query).
WEBDEV - Código Servidor This calculation may take quite a long time if the control is linked to a large data file.
Number of rows in memory (rows added by the user or rows added by TableAdd, TableAddLine, TableInsert and TableInsertLine).
Remarks:
  • Hidden rows (with the Visible property ) are counted.
  • Rows filtered with TableEnableFilter or filtered by the user are not counted.
toVisible
WEBDEV - Código Navegador Constant not available.
Number of visible rows (including the empty rows or the rows that are partially displayed). Corresponds to the maximum number of rows that can be displayed in the control.
WEBDEV - Código ServidorPHP This constant should not be used for Table controls in "Server + AJAX" mode.
Number of visible rows (including the empty rows or the rows that are partially displayed). Corresponds to the maximum number of rows that can be displayed in the control.
Remark: Hidden lines (thanks to the Visible property) are still counted.
Observaciones

Use conditions

TableCount 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 - Código ServidorPHP Reminder: Multi-selection is not available for Table fields in Classic mode.
WEBDEV - Código ServidorPHP This function is available for Table controls in "Server" and "Server + AJAX" mode, and for TreeView Table controls.
WEBDEV - Código Navegador This function is available for Table controls in "Browser" mode only.
WEBDEV - Código Navegador The TreeView Table control is not available.
WINDEVWEBDEV - Código ServidorJavaCódigo de Usuario (UMC)PHPAjax

Equivalence between the TableCount function and the Size property

The TableCount function and the Size property are equivalent:
ResNbColonne = TableOccurrence(<Champ Table>, toColonne)

ResNbColonne = <Champ Table>.Taille
WEBDEV - Código ServidorPHPAjax

Table controls in "Server + AJAX" mode

The value returned by TableCount always corresponds to the number of rows available on the server (for Table controls based on a data file). This value does not necessarily correspond to the data viewed in the Table control in the browser. The changes made by the user on a "Server + AJAX" Table control are applied only on the browser.
Example:
TableCount(TABLE_Table_Ajax, toShown)
// Renvoie 10 au lieu de 9
Componente: wd300obj.dll
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 21/09/2024

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