I have a windows form with 3 tables on a grid :-
Orders, OrderDetails, Products
These are all from Northwind database using sql sever
I can drill down from the orders table and it highlights the relevant order detail record as i select an order from the order grid
However, for the life of me I cannot get the products grid to show the relevant product details against the orderdetails grid.
If I select an order -> the relevant orderdetails are shown in the orderdetails grid
however i want to see in the grid products the relevant product names
Can anyone help?
Using the Biding soruce as the products table and the foreign key from the orderdetails table FK_Order_Details_Order just messes up my grid with labels from the orderdetails grid and not the products grid
Comments
How are you doing it at the moment, are you making the datagrids connect directly to tables in Sql Svr, or are you sending the outputs of the query into a dataset then binding that to the datagrid?
Can you not just use a join query, with some group by clauses to achieve what you need?
Sorry for all the questions, just hard to help without knowing more or seeing what you're trying to achieve exactly. Regards, Dai
------------------------------------------
Do or do not, there is no try. |
------------------------------------------
I'm basically in visual studio 2010 connecting to the northwind database, selecting the tables that i will use, namely, orders, orderdetails and products.
then dragging these onto a windows form.
i have managed to get the second dbgrid orderdetails to drill down based on whatever row i pick in the first grid (orders).
however i cannot seem to do the same with the products table, as i want to see what product names are on the second grid.
So its uses a dataset for all three tables.
Sorry i'm new to vb.net.
I just bought 3 books, Microsoft Visual Basic 2010 Step by Step, visual c# 2010 SArep by Step and ASP.Net 2010 Step by Step.
The problem with these is they show a simple approach, however if you wan to do something a bit meaningful the example required is not in the book.
As I am visual studio 2010 can you suggest any really good books on vb and asp for above application.
Also any good learning sites.
Thanks again. Hope I've answered as required.