PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Use conditions
  • Special cases
  • Equivalence
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
Restores the scrollbar position in a Table or TreeView Table control as well as the selected elements. These elements have been saved by TableSavePositionAndSelection.
Example
SaveTable is string
SaveTable = TableSavePositionAndSelection(TABLE_Table1)
TableDisplay(TABLE_Table1, taInit)
TableRestorePositionAndSelection(TABLE_Table1, SaveTable)
Syntax
TableRestorePositionAndSelection(<Table control> [, <Backup>])
<Table control>: Control name
Name of control to use. This control can correspond to:
  • a Table control.
  • a TreeView Table control.
<Backup>: Optional character string
Backup characteristics returned by TableSavePositionAndSelection. If this parameter is not specified:
  • The last backup performed by TableSavePositionAndSelection on the control is used (if it exists).
  • fIf the option "Store the position and the selection" is checked in the control description ("Details" tab), the last value saved is used.
  • Otherwise, an error occurs.
Remarks

Use conditions

TableRestorePositionAndSelection can be used on:
  • a browsing or memory control.
  • a single-selection or multiselection control.

Special cases

  • The control name used for backup (TableSavePositionAndSelection) can differ from the name used for the restore operation. This feature can be useful to duplicate the position and the selection on two Table controls displayed alternatively for example.
  • TableRestorePositionAndSelection has no effect if the control is empty.
  • TableRestorePositionAndSelection does not work on browsing Table controls with continuous scrollbar (i.e. without proportional scrollbar).

Equivalence

The functions TableSavePositionAndSelection and TableRestorePositionAndSelection are equivalent to the option "Store the position and the selection" available in the "Details" tab of the control description.
Component : wd240obj.dll
Minimum required version
  • Version 14
This page is also available for…
Comments
Video TableRestorePostionAndSelection
https://youtu.be/hR1JDoe7_Fw

https://windevdesenvolvimento.blogspot.com/2019/04/dicas-2090-windev-tabela-101.html

// GLOBAL
gsGUARDA_POSICAO is string=""

// GUARDAR POSICAO
gsGUARDA_POSICAO = TableSavePositionAndSelection(TABLE_WIN_TABELA_EXEMPLO)

// RESTAURAR POSICAO
TableRestorePositionAndSelection(TABLE_WIN_TABELA_EXEMPLO, gsGUARDA_POSICAO)

amarildo
Apr. 29 2019
Exemplo Salvar e Recuperar Posição
s_salva_posicao_tabela is string=TableSavePositionAndSelection(TABLE_cliente)
// Comandos // manutencao_alterar_cliente_fornecedor()
TableRestorePositionAndSelection(TABLE_cliente,s_salva_posicao_tabela)

//Blog com Video e Exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/03/curso-windev-tabela-018-guardar-e.html
De matos AMARILDO
Mar. 21 2016