Database Reference
In-Depth Information
Try It: Modifying a Data Table in a Data Set
Let's update a row and add a row in a data table.
1. Select the DataSetandDataAdapter project, right-click, and choose Add
Windows Form. From the opened dialog, make sure the Windows form is
selected and rename Form1.cs to ModifyDataTable.cs . Click OK to add this
form to the DataSetandDataAdapter project.
2. Select the ModifyDataTable form by clicking the form's title bar, and set the
Size property's Width to 371 and Height to 348.
3. Drag a GridView control to the form, and position it toward the center of the
form. Select this GridView control, navigate to the Properties window, and set
the following properties:
Set the Name property to gvAddress.
For the Location property, set X to 12 and Y to 12.
Set the ScrollBars property to Vertical.
For the Size property, set Width to 331 and Height to 287.
4. Now your ModifyDataTable form in the Design view should look like
Figure 15-9.
Figure 15-9. The Design view of the ModifyDataTable form
 
Search WWH ::




Custom Search