PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Use conditions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Returns:
  • the number of columns found in a Table or TreeView Table control.
  • the number of rows found in a Table or TreeView Table control.
Example
// Number of rows found in the "TABLE_Product" control
ResNumberRow = TableCount(TABLE_Product)
Syntax
<Result> = TableCount(<Table control> [, <Row/Column>])
<Result>: Integer
Number of rows or columns found in the specified control.
<Table control>: Control name
Name of control to use. 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.
Browsing Table or TreeView Table controlMemory Table or TreeView Table control
toShown Number of non-empty rows visible in the control. Number of non-empty rows in the visible part of the control.
Note: The hidden rows (..Visible) are counted.
toColumnNumber of columns found in the control.Number of columns found in the control.
toTotal
(Default value)
  • 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 "end of initialization" code is run when the total is calculated.
Number of rows in memory (rows added by the user or rows added by TableAdd, TableAddLine, TableInsert and TableInsertLine).
Note: The hidden rows (..Visible) are counted.
toVisible 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. 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.
Note: The hidden rows (..Visible) are counted.
Remarks

Use conditions

TableCount can be used on:
  • a browsing or memory control,
  • a single-selection or multiselection control.
Component : wd250obj.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Tabela , Saber quantas e nome das colunas
n_numero_colunas is int=TableCount(TABLE_pedido,toColonne)
FOR x=1 TO n_numero_colunas
s_nome_coluna is string=TableEnumColumn(TABLE_pedido,x)
Trace("Numero Coluna:"+x+CR+"Nome coluna:"+s_nome_coluna)
END

//Blog com Video e exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/04/curso-windev-tabela-021-saber-quantas-e.html
De matos AMARILDO
19 Apr. 2016