Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refreshing a Grid without switching pages…
Message
De
09/09/1998 05:01:15
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Refreshing a Grid without switching pages…
Divers
Thread ID:
00134367
Message ID:
00134367
Vues:
54
I have a main diary page which shows - amongst other things - the tutor and student involved in a particular entry. Another tab lets you see the diary entries just for the tutor on the first page. A third tab lets you see the diary entries for the student on the first page. Neither of these are accomplished with filters or queries. Instead the data environment has additional copies of the diary table open in the appropriate order (tutor ref or student ref) and one to many relationships from the primary diary table to the other tables based on those keys. It works very nicely thank you!

However, for additional functionality I want to give the user the option to change what tutor they are looking at on the tutor page without having to return to page one. Currently, they must return to page one, find an entry with the relevant tutor (either manually or using a picklist) and then return to the tutor page. This is clumsy. So I set up a combo box on the tutor page from which they can select the desired tutor and in the combo's valid method I have it 'seek' the selected tutor in the diary table AND in the tutor table and then issue 'this.refresh' or 'thisform.refresh'. Neither of which work! I've tried calling the grid's init method and that has no effect either. I've tried combinations like 'thisform.page1.activate' and it just crashes.

Conversely, if, after selecting a new tutor from the combo box, I click on page one - where it now displays the first record with the relevant tutor - and then back, immediately, to the tutor page, I get exactly what I want.

So the last thing I've tried is to try to call the pages deactivate and activate methods as below

thisform.pageframe.page2.deactivate()
thisform.pageframe.page1.activate()
thisform.pageframe.page1.deactivate()
thisform.pageframe.page2.activate()

which was as unsuccessful as the other attempts...

My question, therefore, is how to call whatever display refresh methods are being called when I do the switch manually.

What I'm trying to do is force the form to activate page 1 and then immediately activate page 2 (the tutor page) But I can't seem to figure out the syntax for this command from within the valid of the combo box.

One concept I am having difficulty with is figuring out how to refer to the page on which the combo is sitting, or any other page. Is page 2 (where the combo box is) its 'parent' in this context, or is its parent the 'parent class'?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform