troubleshooting Question

Two Datasources in one Datagrid

Avatar of Zihif
ZihifFlag for United States of America asked on
ASP.NETVisual Basic.NET
3 Comments1 Solution867 ViewsLast Modified:
Hey all-
I have the need to bind two different datasources to one datagrid.

I have one datagrid that pulls all entries from a mysql database (table only has a few hundred entries).  This table represents a product catalog.  Then I have a second table that represents the purchase history for all of the products.  Any product will only be sold 1-4 times.  So my user wants to see all of the people that have purchased a specific product, and the user wants to see all of their names in a single field inside of the existing datagrid.  The link between tables in the product_id, which is in the datagrid already.

So, my basic question is... How do I aggregate the return from a second query into a single field in the existing datagrid?  Code examples would be greatly appreciated.

Not sure how hard this is, but if I need to assign more points I will.

Thanks in advance for the help.
P.S. I'm pretty new to asp, and I'm using VB as my language (I'm moderately familiar with VB).
P.P.S. The user isn't interested in a nested datagrid approach or anything that would require the push of a second button.  The user is pretty lazy ;)

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros