ADO.NET Programming in Visual Basic .NET By Steve Holzner, Bob Howell
Table of Contents
Chapter 11. Creating Your Own Data Control
Let's complete the test harness. We already have our data navigator control on the form. Now we need a control to display and manipulate our data. The best choice is the DataGrid control. Go ahead and drop a DataGrid control on the form. Set the Dock property to Top. Select the navigator control and set its Dock property to Top as well. Oops, the navigator went to the top of the form above the grid! This is the same problem we had before with the buttons . Simply use the Bring to Front or Move to Back commands.
Add two more buttons to the form. Name one cmdUpdate and change its Text property to Update. Name the other cmdCancel and change its Text property to Cancel Changes. If you want, although it is not necessary, you can put the buttons in a nested panel structure so that they stay to the right when the control is resized. Look at my code to see how this is done. Your form should look something like Figure 11.5: