How to show details on a Page Tab when activated


Author
Message
Ger Cannoll
Ger Cannoll
Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)
Group: StrataFrame Users
Posts: 430, Visits: 507
I have a form with a TabControl and a few pages . On the Main Page of the TabControl ,I show details from the Parent (Say Customer) and on one of the Pages, I have a Grid whic shows Transactions from a Child Table (Say Invoices).

Where is the best place to put code (on the Activate of the Page ) so that :

If I have that Transaction Page Visible, the Transactions are refreshed when I navigate to a new  Customer on the Main Page of the tabControl

If I have the Main Page Visible and I navigate to a new customer, I dont want to waste time querying the Transactions (because I may not actually want to see the transactions) , but if I 'click' on the Transactions Page, i want to query the Child Table, and just refesh the grid at that point

(The main reason i dont want to 'Refresh' the children each time I change customer, is because there could be hundreds of transactions, and more oftren than not I will just be traversing the Customers , and looking at the data from the Customer table, and will not be interested in the transactions at all)
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi Gerard.

Have you tried putting code in the Form's or BO's Navigated method? There you can use the TabControl SelectedIndex and test if you should requery your list.

As for doing it if the user enters the specific TabPage, I guess the TabPage Enter method should do the job too.
Ger Cannoll
Ger Cannoll
Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)
Group: StrataFrame Users
Posts: 430, Visits: 507
Hi Ivan.

That gives me the info I need and I will give it a try. Many tahnks for your help.
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
You're welcome.

Just come back here during the process if you need.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search