PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Use conditions
  • Positioning on the last row of the Table or TreeView Table control
  • Equivalence with the TableSelectPlus function
  • Special case: Table control with continous scrollbar
  • Code for row selection
  • Selection at cell level
  • Browsing Table control containing more than 10 000 rows
  • Row picker
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
Selects a row in a Table or TreeView Table control. The selected row corresponds to the current row on which the selection bar is displayed.
Versions 16 and later
Linux This function is now available for the WINDEV applications in Linux.
New in version 16
Linux This function is now available for the WINDEV applications in Linux.
Linux This function is now available for the WINDEV applications in Linux.
Versions 18 and later
WEBDEV - Server codePHP This function can now be used to handle the TreeView Table controls in the WEBDEV and PHP sites.
New in version 18
WEBDEV - Server codePHP This function can now be used to handle the TreeView Table controls in the WEBDEV and PHP sites.
WEBDEV - Server codePHP This function can now be used to handle the TreeView Table controls in the WEBDEV and PHP sites.
Versions 19 and later
WEBDEV - Browser code This function is now available in Browser code for the Browser Table controls.
New in version 19
WEBDEV - Browser code This function is now available in Browser code for the Browser Table controls.
WEBDEV - Browser code This function is now available in Browser code for the Browser Table controls.
Versions 20 and later
Android This function is now available for the Android applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 20
Android This function is now available for the Android applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Android This function is now available for the Android applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Example
// Select row #5 in the "TABLE_ProductTable" control
TableSelectPlus(TABLE_ProductTable, 5)
// Select rows # 5 and 7
// in the multi-selection Table control ("TABLE_ProductTable")
TableSelectPlus(TABLE_ProductTable, 5, 7)
Syntax
TableSelectPlus(<Table Name> [, <Subscript 1> [, ... [, <Subscript N>]]])
<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 process belongs will be used.
<Subscript 1>: Optional integer
First subscript of row to select.
If <Subscript 1> and <Subscript N> are not specified, all the rows found in the control are selected.
TableSelectPlus has no effect if <Subscript 1> and <Subscript N> correspond to rows that are already selected. The subscript of the selected row is returned by TableSelect.
If this parameter corresponds to -1, the "current" row (the one with focus) is selected.
WEBDEV - Server codePHP Only the Ajax Table controls are multi-selection. A single subscript can be specified if the control is not an Ajax Table control.
WEBDEV - Server codeWEBDEV - Browser codePHP A single subscript can be specified if the control is a "classic" Table control.
<Subscript N>: Optional integer
Nth subscript of row to select.
If <Subscript 1> and <Subscript N> are not specified, all the rows found in the specified control are selected.
TableSelectPlus has no effect if <Subscript 1> and <Subscript N> correspond to rows that are already selected. The subscript of the selected row is returned by TableSelect.
WEBDEV - Server codePHP Only the Ajax Table controls are multi-selection. A single subscript can be specified if the control is not an Ajax Table control.
WEBDEV - Server codeWEBDEV - Browser codePHP A single subscript can be specified if the control is a "classic" Table control.
Remarks

Use conditions

TableSelectPlus can be used on:
  • a browsing or memory control.
  • a single-selection or multi-selection control.
    WEBDEV - Server codePHP Reminder: The multi-selection controls are available in Ajax only. WEBDEV - Server codePHP Reminder: The multi-selection is not available for the Classic Table controls.
WEBDEV - Server codePHP This function is available for the Ajax Table controls, the Classic Table controls and the TreeView Table controls.
WEBDEV - Browser code This function is available for the browser Table controls only.
WEBDEV - Browser codeAndroidiPhone/iPad The TreeView Table control is not available.

Positioning on the last row of the Table or TreeView Table control

To position on the last row of a Table or TreeView Table control, use one of the following syntaxes:
  • TableSelectPlus: TableSelectPlus(<Table Name>, <Table Name>..Occurrence)
  • ..Occurrence property: <Table Name> = <Table Name>..Occurrence
  • Function TableCount: <Table Name> = TableCount(<Table Name>)

Equivalence with the TableSelectPlus function

For a single-selection Table or TreeView Table control (without stored item), the following syntaxes are equivalent:
TableSelectPlus(<Table Name>, <Subscript>)

<Table Name> = <Subscript>

Special case: Table control with continous scrollbar

Selecting a non-visible row in the Table control does not give focus to the selected row.
Note: We recommend that you use a Table control with proportional scrollbar.

Code for row selection

The process for row selection is not run during the call to TableSelectPlus.
Versions 16 and later
WINDEVWindows MobileJava

Selection at cell level

For a Table control that is using a "Multiple selection" mode for the cells, ..Selected is used to find out whether a cell is selected or to select a cell by programming.
For example:
// Example for selecting a cell
TABLE_ListCustomers[3,2]..Selected = True
New in version 16
WINDEVWindows MobileJava

Selection at cell level

For a Table control that is using a "Multiple selection" mode for the cells, ..Selected is used to find out whether a cell is selected or to select a cell by programming.
For example:
// Example for selecting a cell
TABLE_ListCustomers[3,2]..Selected = True
WINDEVWindows MobileJava

Selection at cell level

For a Table control that is using a "Multiple selection" mode for the cells, ..Selected is used to find out whether a cell is selected or to select a cell by programming.
For example:
// Example for selecting a cell
TABLE_ListCustomers[3,2]..Selected = True

Browsing Table control containing more than 10 000 rows

In a browsing Table control containing more than 10 000 rows, for performance reasons, the positioning in the Table control is approximate.
For an exact positioning, you must:
  1. Perform a search with HReadSeek.
  2. Use TableDisplay associated with the taCurrentSelection constant.

Row picker

When the style of the Table control contains a row picker, the arrow on the left is positioned on:
  • the last selected row when the multiple selection is performed with the mouse or with the keyboard,
  • the row to which "focus" is gien by assigning the Table control. For example:
    // Positions the row picker on the 3rd row
    // And selects the rows 3, 4 and 5
    TABLE_ListCustomers = 3
    TableSelectPlus(TABLE_ListCustomers, 3, 4, 5)
Components
WINDEVReports and Queries wd230obj.dll
WEBDEV - Server code wd230page.dll
Windows Mobile wp230obj.dll
WEBDEV - Browser code WDJS.DLL
Java wd230java.jar
Linux wd230obj.so
Android wd230android.jar
Minimum required version
  • 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
May 18 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
May 15 2017
Exemplo TableSelectPlus
// Exemplo TableSelectPlus

TableDisplay(TABLE_material_grupo)
TableSelectPlus(TABLE_material_grupo,TABLE_material_grupo..Occurrence)

// Blog com Video e Exemplo

http://windevdesenvolvimento.blogspot.com.br/2016/12/aula-985-tabela-36-tableselectplus.html

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

De matos
Dec. 04 2016
Exemplo TableSelectPlus
//Estou Indo Linha a Linha
//I´m going line by line
//je vais ligne par ligne
gn_contador++
TableSelectPlus(TABLE_Cliente,gn_contador)


//Vou direto para Essa Linha 5
//I go straight to line 5
//je vais directement à la ligne 5
TableSelectPlus(TABLE_Cliente,5)

//Blog com video e Exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/02/curso-windev-tabela-009-tableselectplus.html
De matos AMARILDO
Feb. 16 2016