PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → WD[18] Reload data into table control that is link directly to a database.
WD[18] Reload data into table control that is link directly to a database.
Iniciado por guest, 10,may. 2015 00:42 - 4 respuestas
Publicado el 10,mayo 2015 - 00:42
Hi

I have a table that is linked to a database directly. I am not using a query to load the data into the table, I am linking straight to the database. I need to reload the table. As it is now I don't need to do anything. What I need is the row display event to execute again as each row of data is loaded into the table. TableDisplay is not cutting it. I need WD to empty the table and link to the file again and load records into the table causing the row display to fire when each row is loaded with a record. Can anybody help.

Thanks for any help I might receive.
Publicado el 10,mayo 2015 - 12:00
John
More info please - what exactly is not happening.

I just set up a simple table control bound directly to a data file + a button coded with TableDisplay(MyTable,taInit).
Added a trace in 'On display' code section.

Trace is displayed when window is opened.

As expected the trace is again displayed when the button is clicked.

Are you sure your TableDisplay() code is firing?
Publicado el 11,mayo 2015 - 08:53
Hi

Just as Derek states use the tabledisplay() function. Make sure you add the tainit

TableDisplay(MyTable,taInit) means it runs the initiation of the table. A binded table will indead run again.

Regards

Allard
Publicado el 11,mayo 2015 - 13:25
Thanks DerekT and Allard. Will give it a try when I get back home in a few days.
Publicado el 11,mayo 2015 - 16:23
Hi John,

"Row display" event will only be executed for the rows that are actually displayed. It will not fire for data not displayed on screen "yet". If you need that every row be "displayed" you will have to loop through the table (if my memory is good, doing a FOR EACH will do the job - and I think it will work even if you set ..DisplayEnabled to false).

Best regards,
Alexandre Leclerc