The dgDetails is a BindingSource.
The DataGridView is most likely set to use this bindingsource so that when the bindingsource sets the binding to the dataset its datamember of most lilkey the first datatable is then displayed in the gridview.
Okay, the programmers haven example is using the old DataGrid component that has been replaced with the newer DataGridView component in VS2005 and higher. The old one is available by adding it to the toolbox, but instead of telling you more about that, I will show you how to use the DataGridView.
First drag a DataSet component from the toolbox onto the form.
Name it "ds" for now.
Now drag a DataGridView component onto the form. For now, just ignore its wizard and use the untyped option. Name it "dgDetails".
Now if you want to know more about the BindingSource, I will give you a short definition, and you will need to study it further.
The BindingSource can be dropped onto your form, and instead of setting the DataGridView DataSource to the adapter like we did above, set it to the BindingSource in the designer (IDE).
Set the BindingSource.DataSource and DataMember like we did above to the DataSet you dropped (DataMember goes to the table in the dataset which you can manually create in the IDE).
Now the BindingSource offers a few advantages, you can assign multiple components to this BindingSource so that as you move through the records, all of the bound components will automatically update. Example is a bunch of labels, or textboxes that are data bound to a field in the datatable. Also you can add a BindingNavigator which gives you a component to help navigate through the data. Because it is also bound to the BindingSource, as it repositions the records pointer, all of the bound components will reflect the data for that record.