PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

  • Characteristics of Table control (by default)
  • Memory Table control
  • Columns
  • Various
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
Creates a Table control from the items found in a data file (view or query). Each control column is associated with a file item. The width of columns is automatically adapted according to the data found in the file or query.
This function is used to get a Table control adapted to the browse of a specific data file.
Versions 16 and later
WINDEVLinux This function is now available for the WINDEV applications in Linux.
New in version 16
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
// Displays the content of "CUSTOMERS" file in a browsing Table control
BuildBrowsingTable(TABLE_TABLE1, "CUSTOMERS", taWithAutoId)
// Displays the query content in a memory Table control
IF HExecuteQuery(QRY_LIST_ACTIVE_CUSTOMERS) = True THEN
BuildBrowsingTable(TABLE_CUSTOMERS, ...
QRY_LIST_ACTIVE_CUSTOMERS, taFillTable)
END
Syntax
BuildBrowsingTable(<Table Control> , <File Name> [, <Options>])
<Table Control>: Control name
Name of Table control (browsing Table or memory Table).
Caution: This control must exist in the window.
Versions 19 and later
It may have been created by ControlCreate.
New in version 19
It may have been created by ControlCreate.
It may have been created by ControlCreate.
The records found the data file are directly viewed if this parameter corresponds to a browsing Table control.
<File Name>: Character string (with or without quotes)
Name of data file, view or query used as a base for creating the Table control.
<Options>: Optional constant (or combination of constants)
Configures the creation mode of columns in the Table control.
Operating mode with the constantDefault operating mode
taWithBinaryThe binary items (link composite key for example) are added into the Table control.By default: The binary items (link composite key for example) are not added into the Table control.
taWithAutoIdA column is generated for the automatic identifier.By default: No column for the automatic identifier.
Versions 23 and later
taWithLinkDetails
New in version 23
taWithLinkDetails
taWithLinkDetails
A sub-table is automatically generated to display the items of linked data files in the analysis.
Windows Mobile This constant is not available.
By default: No "row details" window is displayed.
taKeepBrowseKeyThe search key of browsing Table control is not modified (this search key is returned by ..BrowsedItem).By default: The first key item found is positioned as search key.
taKeepColumnThe existing columns found in the Table control are not deleted.By default: The existing columns are deleted.
taItemCaptionThe captions of items are used for the titles of columns.By default: The name of the item is used as column title.
taByLogicalOrderThe columns are created according to the logical order of items defined in the data model editor.
For the queries, the logical order and the physical order of items are identical.
By default: The physical order of the items in the data file is used.
For the queries, the logical order and the physical order of items are identical.
taFillTableA memory Table control will be filled with the content of the data file (Caution: long operation that can overflow the memory).By default: The memory Table controls are not filled.
taInputAutoIdInput allowed in the column associated with the automatic identifier (if it exists and if the Table control is in edit).
taNoAdjustThe width of the columns is not adjusted (the records are not read).
taNoMemoTextThe 'text memo' items are not added into the Table control.By default: The "text memo" items are added into the Table control.
taNoMemoImageThe "image memo" items are not added into the Table control.By default: The "image memo" items are added into the Table control.
Remarks

Characteristics of Table control (by default)

  • The columns of Table control defined in the editor are deleted.
  • The input modes defined in the editor for the Table control are kept.
  • A column whose type is identical to the item type is created for each item of the data file.
  • No column is created for the binary memo items (a column is created for the text memo items or for the image memo items).
  • The properties of Table control and columns are updated to allow the file browse:
    <Name of Table Control>..BrowsedFile = <File Name>

    and for each column:
    <Column Name>..FileLink = <Name of associated item>
    <Column Name>..BrowsedItem = <First file key>
WINDEVReports and QueriesUser code (UMC)

Memory Table control

If <Table Name> corresponds to a memory Table control, no data is displayed (the Table control is empty) but the properties of Table control and columns are assigned like for a browsing Table control.
To display data in the Table control, you must use TableAdd or BuildBrowsingTable associated with the taFillTable constant.
Note: The taFillTable constant cannot be used to fill a memory Table control with image memos. To add an image into a memory Table control, the corresponding file must be found in the application library (WDL file) or it must be accessible from the current computer.

Columns

The created columns are named "_COL1", "_COL2", "_COL3", etc. These columns are accessible by programming via the indirection operator { }.
You cannot write:
TABLE_TABLE1._COL1..Width = 120 // Generates an error "_COL1 unknown"
You must write:
{"TABLE_TABLE1._COL1"}..Width = 120

Various

  • BuildBrowsingTable performs a browse in the data file. The current record may be modified once this function has been used.
  • The table is filled by BuildBrowsingTable in a parallel process in background: if the data source is a query, this query must not be freed before closing the window or before reinitializing the Table control.
Components
WINDEVReports and Queries wd230obj.dll
Windows Mobile wp230obj.dll
Linux wd230obj.so
Minimum required version
  • Version 9
This page is also available for…
Comments
Exemplo BuildBrowsingTable
//Nessa aula vou mostrar como criar uma tabela com uma coluna
//e com comando BuildBrowsingTable , fazer com
//que ele coloque as colunas corretas e as preenchas

//Qry_Cliente_ler
SELECT
cliente.razao_social_nome AS nome,
cliente.id_cliente AS Id,
cliente.telefone AS telefone
FROM
cliente

//Qry_Material_Ler
SELECT
material.id_empresa_material AS id_material,
material.nome AS nome,
material.preco_venda AS preco_venda
FROM
material

//

BuildBrowsingTable(TABLE_diversos, caixa_conta, ...
taWithAutoId+taFillTable+taInputAutoId+taItemCaption+taByLogicalOrder)
//

BuildBrowsingTable(TABLE_diversos, QRY_cliente_ler,...
taWithAutoId+taFillTable+taInputAutoId+taItemCaption+taByLogicalOrder)

//

BuildBrowsingTable(TABLE_diversos, QRY_material_ler, taWithAutoId+taFillTable+taInputAutoId+taItemCaption+taByLogicalOrder)

// Blog com Video e Exemplo

http://windevdesenvolvimento.blogspot.com.br/2017/02/aula-1064-windev-tabela-044.html

https://www.youtube.com/watch?v=X8WGv09ZVao
De matos
Feb. 21 2017
Usando Querie Com Parâmetro
Você pode usar a função BuildBrowsingTable com querie com ou sem parâmetros: veja o código abaixo:

SWITCH COMBO_tipo_consulta
CASE "Cidades" //querie sem parametro
BuildBrowsingTable(TABLE_consulta,QRY_Cidades,taFillTable)
CASE "Clientes Por Cidade" //querie sem parametro
BuildBrowsingTable(TABLE_consulta,QRY_clientes_por_cidade,taFillTable)
CASE "CRE Por Cliente" //querie com parametro
QRY_cre_do_cliente.CodigoCliente = 2 //parametro CodigoCliente
BuildBrowsingTable(TABLE_consulta,QRY_cre_do_cliente,taFillTable)
END

//Blog
http://is2sisinfo.blogspot.com.br/2016/04/windev-funcao-buildbrowsingtable-com-querie-com-e-sem-parametro.html
ANDRE MARTINI / IS2
Apr. 22 2016
Exemplo Criar Tabela

//Mostrar arquivos
ListDeleteAll(COMBO_arquivos)
s_arquivos_lista is string=HListFile("","")
FOR EACH STRING s_nome_arquivo OF s_arquivos_lista SEPAREE BY CR
IF s_nome_arquivo<>"" THEN
ListAdd(COMBO_arquivos,s_nome_arquivo)
END
END

//Mostra tabela
s_arquivo is string=COMBO_arquivos..StoredValue
BuildBrowsingTable(TABLE_arquivos,s_arquivo,taFillTable)

//Blog com Video e Exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/04/curso-windev-tabela-023.html
De matos AMARILDO
Apr. 21 2016