Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleUse the DataGrid control to display master/detail relationships
Keywordsmaster/detail, DataGrid, database
CategoriesDatabase
 
Thanks to Bob Ceccarelli.

This example uses customer, order, and order detail classes to manage the data. A customer object contains references to any number of order objects. Each order contains references to order detail objects.

Change the value of DB_PATH in the .bas file so it points to the Northwind database that came with your copy of Visual Basic.

When you select a new customer, the program loads the customer's orders. When you select one of the orders, the program displays its order items in the DataGrid. See the code for details.

 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated