This Microsoft Developer CUSTOMISING DATAGRIDVIEWS exercise is provided to allow potential course delegates to assess their suitability for the Wise Owl VISUAL BASIC 2005 WINDOWS FORMS course only, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.
A full answer to this exercise is provided as part of the training course!
| 1) | Create a new form called frmPersonWithDropDown. |
| 2) | Create a datagridview containing a combobox linked to the MortgageType table and a command button (you must have done the exercise to create and SQL Server Express mortgage applications database first): |
The combo box is showing the mortgage type, but storing the id
|
|
| 3) | You may find the following properties useful: |
These are some of the properties you could set for the ComboBox column
|
|
| 4) | Arrange it so that when you click on the Show button for any row, it shows that person's mortgage amount. For the mouse pointer in the position shown above, this would show: |
The loan required for Susan Smith is indeed £100,000
|
|
| 5) | Close any forms that you have open. |
Thank you for showing an interest in this Visual Basic 2005 Windows Forms training course! As mentioned above, full answers to this and other exercises are provided on the course. On all Wise Owl scheduled courses delegates can take away these model answers (together with their own efforts!) on a free USB stick.
Recommended sites: C# corner | Computer tutorials | Training classes