Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
3
Erster Beitrag:
vor 3 Jahren, 3 Monaten
Letzter Beitrag:
vor 3 Jahren, 3 Monaten
Beteiligte Autoren:
Piet van Zanten, Tor-Bjarne, Jbistuer

Working with tabs in WB19

Startbeitrag von Jbistuer am 14.11.2014 08:42

Hi everybody,

I need to do an operation in WB19 and I do not find the way. I tell you.
I have a page with a field 'onglet' with 4 tabs and I need to detect when the user "click" on one of them.
Each tab presents information in a grid from a SQL query because the information retrieved is different in each tab.
Example, tab1 is loaded from query1, tab2 from query2, etc.
All the queries are now running all at once when i open the page that takes a lot of time.
The idea is to execute the SQL associated with that tab only when the tab is selected by user.
I've been looking for an event such as 'Click' or 'Get Focus' or something equivalent for the tab but I can not find it.
Any idea, please?
Thanks in advance.
Salutacions / Regards
Jordi

Antworten:

Hi,

When you select the tab you got a code section "Modifying the pane of tab xxx"

then you can do a :

Switch yourtabname
case 1 // First tab
case 2 // Second
other case
end


Also check out data source and view (Hcreateview) where you can make a memory table of your data.

Cheers
Tor-Bjarne

von Tor-Bjarne - am 14.11.2014 09:55
Hi Jordi,

You can use an AJAX enabled procedure for that.
Create a procedure that does what you need and enable AJAX by clicking AJAX in the yellow bar on top.
The red dot will turn green.
In the "Whenever modified" browser code of the tab you do an Ajaxexecute for that procedure.
The procedure needs the current Tab as parameter: AJAXExecute(MyProcedure,tab_Tab1)
Regards,
Piet

von Piet van Zanten - am 14.11.2014 10:02
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.