Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tab Control and Datagrid

Status
Not open for further replies.

hafa2000

Technical User
Aug 14, 2009
7
IE
Hello,

I'm new to VB.NET (coming from Microsoft Access), so any help here is greatly appreciated!

I have a simple vb.net project with a form, dbSource, DataSet, BindingSource and TableAdapter.
Project uses a Microsoft Access db with a 4 tables; tblJobs with a 1:M relationship with tblDelivery, tblJobSales and tblJobCharges.
On the form there is the Job information and a Tab Control with 3 tab pages for related data on the tblDelivery(1st Tab), tblJobSales(2nd Tab) and tblJobCharges(3rd Tab).
Each tab page has a DataGridView.
When I run the form the DataGridView in the first tab is populated with data no problem.
The problem is when I click on tab page 2 and tab page 3 the DataGridView does not show up.

Basically trying to duplicate a Microsoft Access form (Main Form with 3 subforms in a tab control).

Thanks,
Steve
 
Hi David,

Actually no I'm not. I am still trying to get my feet wet with VB.Net. Let me know if the Tab enter/leave events work for showing the DGV on the other tabs?

Thanks
 
Each tab page is its own container. You need to add a grid to each tab to accomplish what you're needing.

--------------------------------------------------
“Crash programs fail because they are based on the theory that, with nine women pregnant, you can get a baby a month.” --Wernher von Braun
--------------------------------------------------
 
Hi Ousoonerjoe,

Each tab has it's own grid but it is not showing up. Only the DGV on the first tab is shown by default when the form loads. When I click on tab2 or tab3 the DGV is not showing up, yet it's their in design time.
 
and you're sure the grids are physically located on each tab page AND set to visible? Remember, you have to treat each tab page as its own little form. Tab1 = dgv1, Tab2 = dgv2, Tab3 = dgv3, etc.

--------------------------------------------------
“Crash programs fail because they are based on the theory that, with nine women pregnant, you can get a baby a month.” --Wernher von Braun
--------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top