Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (21.47 KB, 1 trang )
1.9 Drill Down to Data in the DataGrid Control
The DataGrid control in Visual Basic .NET is an effective way to display multiple
records related to a base table, such as Customer and Orders tables. You can then drill
down into individual orders to see the details. This How-To explains how to open an
additional form with another DataGrid control and drill down to the order details.
Although it is nice to see what orders a customer has, you would like to display more
information about the orders. How do you drill down into the details of the orders
displayed in the DataGrid control?
Technique
Using the form you started in How-To 1.8, you are going to allow the user to highlight a
specific order. You are going to drill down to it by opening a new form and having that
form's text boxes display order header information. Then you will use another DataGrid
control to display order details. You can see this example in Figure 1.15.
Figure 1.15. Drilling down to an order's detail.