Click here to Skip to main content
16,004,778 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
For example, i have 3 tabs with 3 diferent datagrids;
- tabPage1, tabPage2 and tabPage3;

And this datagrids:

- Dgv1, Dgv2 and Dgv3. Each "Dgv" is assigned to a single tab on my Windows Forms application.

The problem I'm facing is the fact that i want to load the datagrid when i click on a certain tab, for example:

When i click tabPage2 i want it to load the Dgv2 and the corresponded Parameterized queries!

Any ideias?
Posted

1 solution

Handle the TabControl.Selected Event (System.Windows.Forms)[^] - it occurs when the page is selected and about to become visible.
 
Share this answer
 
Comments
Scribling Doodle 27-Jan-16 5:08am    
Can you show me a example code with the information given so i can understand where to put everything in the right place? Thanks in advance!
OriginalGriff 27-Jan-16 5:19am    
The link includes sample code!
Scribling Doodle 27-Jan-16 5:37am    
I couldn't understand what msdn had in that topic, that's why i asked for a sample code according to my needs. Thanks in advance!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900