Completing the Test Harness

Team-Fly team-fly    

 
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:

Figure 11.5. The completed test harness.

graphics/11fig05.gif


Team-Fly team-fly    
Top


ADO. NET Programming in Visual Basic. NET
ADO.NET Programming in Visual Basic .NET (2nd Edition)
ISBN: 0131018817
EAN: 2147483647
Year: 2005
Pages: 123

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net