The DataTableCode example on the CD-ROM creates a data table from scratch, uses it to create a dataset, and then binds that dataset to a data grid, as you see in Figure 22.2. This example will show us how to create not only a data table from scratch, but also an entire dataset.
Let's see how this works in code. When the user clicks the "Create and bind new data table" button you see in Figure 22.2, the code starts by creating a data table named Employees, like this:
Private Sub Button1_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles Button1.Click Dim Table1 As DataTable Table1 = New DataTable("Employees") ⋮
The next step is to stock the data table with columns, and we'll do that in the next topic.