GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEV
,
WEBDEV
e
WINDEV Mobile
Inicio
|
Mensagens recentes
|
Conecte-se...
|
Disconnect
|
Português
Inicio
→
WINDEV 2024
→
Display last row on Table Control
Display last row on Table Control
Iniciado por PRADEEP / Virtual So, jul., 30 2019 10:50 AM - 3 respostas
Conecte-se…
PRADEEP / Virtual So
#1
Membro registado
6 mensagems
Publicado em julho, 30 2019 - 10:50 AM
I am populating the Table control with records using TableAddLine. The records are read from an external file.
Algorithm is as shown below:
BTN_getFileData
-
fileID
=
fOpen
(
fileName
)
Buffer
=
fReadLine
(
fileID
)
LOOP
-
>
TableAddLine
(
TABLE_
myTable
,
Buffer
)
IF new Line
ADDED
THEN
TablePosition
(
TABLE_
myTable
,
gn
CurrentLineNumber
,
taVisible
)
//*** WORKS FINE
fTrackFile
(
fileName
,
checkNewRecordsInFile
,
ftModifyFile
)
Procedure to update Table with new records: checkNewRecordsInFile
fileID
=
fOpen
(
fileName
)
Buffer
=
fReadLine
(
fileID
)
LOOP
-
>
TableAddLine
(
TABLE_
myTable
,
Buffer
)
IF new Line
ADDED
THEN
TablePosition
(
TABLE_
myTable
,
gn
CurrentLineNumber
,
taVisible
)
//*** SHOWS FATAL ERROR
The table needs to display the latest record added, by scrolling to the bottom of the Table, each time a record is updated.
This works fine within the BTN_name, but throws a fatal error when I try to update within proceddure
--
--
Pradeep
Denunciar
0
0
MANUEL
#2
Membro registado
4 mensagems
Publicado em agosto, 09 2019 - 7:48 PM
gnCurrentLineNumber = TableAddLine(TABLE_myTable, Buffer)
TablePosition(TABLE_myTable, gnCurrentLineNumber)
--
mjcc
Denunciar
0
0
PRADEEP / Virtual So
#3
Membro registado
6 mensagems
Publicado em agosto, 15 2019 - 11:57 PM
Thank You Manuel.
If you see the question, TablePosition was setting to the last records of the table.
The problem was when I try to set the TablePosition within an interrupt.
To make it work, I had to invoke a Global procedure from the file modification interrupt.
--
Pradeep
Denunciar
0
0
Sebastian Arnold
#4
Membro registado
102 mensagems
Popularité : +2 (2 votes)
Publicado em setembro, 06 2019 - 12:00 PM
Hi Pradeep,
not shure if I understood the question, but maybe this helps:
SendKey
(
"^{END}"
,
TABLE_
myTable
)
This will send a keystroke to the table TABLE_myTable, you can use this in your procedure.
HTH
Sebastian
--
WD23 with Oracle, WDM23 Apps for Android, iOS and Windows CE.
Python 3 with Oracle and MySQL. PHP with MySQL and JSON.
Denunciar
0
0
→ Voltar para WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (versões anteriores)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Tipo de Pesquisa
Apenas tópicos
Todas as mensagens
Período de pesquisa
Qualquer momento
Última hora
Últimas 24 horas
Semana passada
Mês passado
Ano passado
Cancelar
Pré-visualização da sua mensagem
Adicionar imagem
Importar uma imagem de uma URL
Enviar uma imagem a partir do seu disco
Deixe um ficheiro ou clique em "Procurar ..."
ou
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto