• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 508
  • Last Modified:

In Master Detail Datagridview how to use TabControl in Detail datagridview section

Hello:
I am using Visual Basic 2008......
In my project, I have master detail datagrid view which is working fine. But in my detail grid I've lots of columns which I would like to put them in five different tab pages. I know I've to create sql query for each of those five tab with 'WHERE' clause but not sure how to display them for each of those tab pages.
For example:
Whenever I select customer from master grid, 5 different products (whichcan be identified with the type of product) displays In my detail grid which is working fine.
But what I like to do is to display each type of products in 5 different tab pages in my Detail datagrid section.
Could anyone please give me some idea or sample code on how to achieve this?

Thanks so much in advance.
0
guavamay
Asked:
guavamay
  • 3
  • 3
1 Solution
 
CodeCruiserCommented:
Do you mean you want 5 tabs each with a grid in the details section?
0
 
guavamayAuthor Commented:
Yes.
For example, say Tabpage1, Tabpage2, Tabpage3 etc... in the detail grid section. So when I select a row from Master grid (which has a customer name, address etc. ) I would like to be able to choose Tabpage1 from detail section which will give me information on Product TypeA for that customer. If I select Tabpage2 from detail section, it should display information on Product TypeB for that customer. Same way for Tabpage3 to 5 but different Product Type.
Hope this explaination helps.

Thanks so much.

 
0
 
CodeCruiserCommented:
Do you use datasets? You could use filtering on the dataset or use different queries to populate different grids in the details section.
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
guavamayAuthor Commented:
Yes, I do have a dataset. Right now this dataset has all the product type information.
Couple of questions for you......
1. Should I have 5 different datasets for each of the product type?
2. Or have one dataset and read dataset to filter ? In this case how do I filter, meaning how do I read dataset to create 5 different query?
3. Right now I only have one detail datagridview which is displaying for all those 5 tabpages. Eventhough no datas on them. So should I also have 5 different datagridview for detail section for each of the tabpages?

Thanks so much.
0
 
guavamayAuthor Commented:
Thank you so much for all the links. |I learned a lot from all those websites.
Thanks again for your help.
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now