ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Table functions
  • Use conditions
  • Special cases
  • Tip for Table and TreeView Table controls based on a data file
  • Native SQL Server Connector
  • Miscellaneous
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Refreshes a Table or TeeeView Table control from a given position:
  • for a "file" Table or hierarchical Table field: changes made to the linked data file are reflected in the field.
  • for a "programmatically" populated Table or hierarchical Table field: calculated columns are re-calculated.
Example
// Refresh the "TABLE_ProductTable" control from the beginning
TableDisplay(TABLE_ProductTable, taStart)
Syntax
TableDisplay(<Table control> [, <Position>])
<Table control>: Control name
Name of the control to be refreshed. This control can correspond to:
  • a Table control,
  • a TreeView Table control.
If this parameter is an empty string (""), the control to which the current event belongs is refreshed.
<Position>: Integer, character or constant (optional)
Indicates the start position for the refresh. If this parameter is not specified:
  • For a control based on a data file, the function behaves as if the taInit constant was passed as parameter.
  • For a control populated programmatically, the function has no effect.
This parameter can correspond to:
  • An integer. The refresh is performed from this position. The row selected in the control is not modified.
    For a control based on a data file, the "Display a row" event of the <Position> row is executed. The row selected in the control corresponds to the current record in the data file.
    For a control populated programmatically, the <Position> row is displayed again.
  • A character or a constant:
    Table or TreeView Table control based on a data fileTable or TreeView Table control with in-memory data sourceTable or TreeView Table control populated programmatically
    taStart
    (Default value)
    • Refreshes the control while being positioned at the beginning of control.
    • The first control row is selected. This row corresponds to the first record of the datafile.
    No effect.No effect.
    taCurrentSelection
    • Refreshes the control from the position of the selection bar.
    • The position of selection bar is not modified. The current record in the data file will correspond to the record selected in the control (after TableDisplay is called).
    • Redisplays the control while reinitializing the values of calculated columns.
    • The selected row is unchanged.
    • Redisplays the control while re-calculating the values of calculated columns.
    • The selected row is unchanged.
    taCurrentRecord
    • Re-runs the linked query if necessary.
    • Takes into account the records added, modified or deleted by other computers.
    • Selects the current record (if the browse defined in the control is performed on a unique key). If the current record is deleted or if it does not correspond to the filter, selects the next record that has not been deleted.
      If duplicates are found on the browse item, the row selected among the duplicates will be undefined.
    • The scrollbar position is stored as long as the selection remains visible.
    • Runs the initialization start and end events, then the "Select a row" event for the selected row (even if it is not modified).
    AndroidiPhone/iPadJavaPHP This constant is not available.
    No effect.No effect.
    taCurrentFirst
    • Refreshes the control from the current record in the data file.
    • The first control row is selected. This row corresponds to the current record.
    • Redisplays the control while recalculating the values of calculated columns.
    • The selected row is unchanged.
    taInit
    • Runs the initialization codes of control (initialization code and end of initialization code).
    • Runs the initialization code of columns found in the control.
    • Fills the control.
    • The first row of Table control is selected. This row corresponds to the current record in the data file at the end of the initialization code in the control.
    No effect.No effect.
    taPrevious
    • Refreshes the control while being positioned at the beginning of control of previous page (same as using the pager to access the previous page).
    • The first visible control row is selected. This row corresponds to the current record in the data file.
    WINDEVAndroidiPhone/iPad This constant is not available.
    No effect.No effect.
    taReExecuteQuery
    • Re-runs the query linked to the control. For more details, see Table control and queries.
    • Refreshes the control while being positioned at the beginning of control.
    • The first control row is selected. This row corresponds to the first record in the query result.
    Caution: Only the query linked to the field is executed. If specific options have been specified by HExecuteQuery (with hModifyFile for example), these options are ignored.
    No effect.No effect.
    taNext
    • Refreshes the control while being positioned at the beginning of the Table control of the next page (same as using the pager to access the next page).
    • The first visible control row is selected. This row corresponds to the current record in the data file.
    WINDEVAndroidiPhone/iPad This constant is not available.
    No effectNo effect.
Remarks

Use conditions

TableDisplay 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 - Server code The page containing the control is refreshed.
WEBDEV - Server codePHP Reminder: Multiselection is not available for "classic" table fields.

Special cases

TableDisplay has no effect:
  • If <Position> is an integer and if this integer is invalid.
  • If <Position> is an integer and <Table control> is a Table control based on a data file with a "bouncing scrollbar".
Reminder The rebound elevator is an old-fashioned method of operation. With a bouncing scrollbar, the cursor returns to the middle of the track each time you click on the scrollbar arrow buttons (or by using the up arrow or down arrow of the keyboard). To create a bouncing scrollbar, uncheck "Proportional scrollbar" in the "Details" tab of the control description window.
WEBDEV - Server code TableDisplay has no effect if the <Position> parameter is an integer and if that integer is invalid.

Tip for Table and TreeView Table controls based on a data file

To display a calculation in a calculated column or to format a cell ("red background if value greater than 50" for example), use the "Display a row" event of the control.
WINDEVWEBDEV - Server codeUser code (UMC)AjaxNative Connectors (Native Accesses)

Native SQL Server Connector

If TableDisplay handles a control linked to a data file accessed by the Native SQLServer Connector, we recommend that you use the taCurrentFirst and taStart constants.
WINDEVWEBDEV - Server codeReports and QueriesJavaUser code (UMC)Ajax

Miscellaneous

The taFromFile constant and the taCurrentFirst constant are identical. This constant is kept for backward compatibility and it is displayed in orange in the code editor.
Component: wd300obj.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Let's do the registry change.
//Aula 1153 WinDev Curso ErpAmarildo 11 - Tabela Codigo de Alteração

//Nessa aula de hoje
//vamos fazer a alteração do registro.

//En esta clase de hoy
//Vamos a cambiar el registro.

//In this class today
//Let's do the registry change.

IF TableSelect(TABLE_QRY_RELACAO_EMPRESAS)=-1 THEN RETURN
_indice is int=TableSelect(TABLE_QRY_RELACAO_EMPRESAS)
HReadSeekFirst(empresa,empresaID,TABLE_QRY_RELACAO_EMPRESAS.COL_EmpresaID)
IF HFound(empresa) THEN
Open(WIN_Form_empresa)
END
TableDisplay(TABLE_QRY_RELACAO_EMPRESAS,taReExecuteQuery)
TableSelectPlus(TABLE_QRY_RELACAO_EMPRESAS,_indice)
De matos
18 May 2017
Let's change the Add Button Code
//Nessa aula de hoje
//Vamos alterar o Codigo do Botao Incluir
//na Relacao de Empresas

//In this class today
//Let's change the Add Button Code
//In the Business Relationship

//En esta clase de hoy
//Cambiar el código del botao Incluir
//En la Relación de Empresas


HReset(empresa)
Open(WIN_Form_empresa)
TableDisplay(TABLE_QRY_RELACAO_EMPRESAS,taReExecuteQuery)
TableSelectPlus(TABLE_QRY_RELACAO_EMPRESAS,TABLE_QRY_RELACAO_EMPRESAS..Occurrence)

//Blog com Video e Exemplo

https://forum.pcsoft.fr/pt-BR/pcsoft.br.windev/2374-video-aulas-amarildo-aula-1150-windev-curso-erpamarildo/read.awp

http://windevdesenvolvimento.blogspot.com.br/2017/05/aula-1150-windev-curso-erpamarildo-8.html

https://www.youtube.com/watch?v=r87vz1ref7k

De matos
15 May 2017

Last update: 11/15/2024

Send a report | Local help