Click here to Skip to main content
13,044,428 members (111,565 online)
Rate this:
Please Sign up or sign in to vote.
Hi all,

I'm fairly new to programming (been at it for a year now). I'm having some trouble with my program. I use a lot of datagridviews but somethimes it just doesn't cut it (or i don't know how to do it) :-)

My question to all you advanced programmers. I have a table called orders (sql 2008 database) with some fields like: OrderID, Date, OrderedBy,... And then i have another table called Orderlines with the fields as: OrderID, ProductID, Quantity, Amount, Cost, LineNR,...

These twoo relate one to many. So orders is the 'headline' and it has some detailed orderlines. Now i would like to show them in a grid of some sort that users can expand per orderID and so expand the orderlines. Is something like this possible? Any step in the right direction would be grately appreciated.

BTW: i used to have the orders in one grid and then with selection changed i showed the orderlines in another grid.

Thanks in advance (and sorry for my english)!

Posted 9-Jul-12 9:49am
Updated 9-Jul-12 9:52am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

IF this problem is WPF related I would create a ListView that had one filed with an expander in it called Orders. In Windows Forms I dont really know...

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 10 Jul 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100