Overview
I am using Windows.Forms.
I have a typed dataset with three tables (defined in a dll) I want to display in the DataGridView. I can see the data in the tables using the debugger, but I cannot change the view from one table to another - actually, I think the data might change, but the columns do not display properly.
Detail
I have aBindingSource defined usingthe dataset as the DataSource.
I have a BindingNavigator defined on the BindingSource. (That appears to work properly. I.E. when I change the data member the number of records changes to the number of records in the table.)
And I have the DataGridView using the BindingSource as the DataSource.
If I select a table as the DataMember in the IDE, I can display that table properly. However, when I change the DataMember in code, the column headers do not change. N.B. Two of the tables have a common field name. If I use one of these tables as the DataMember and change to the other, only the common field has data.
If I do not specify a table name in the IDE and try to set it in code, i.e. dgv.DataMember = "tableName"; *no* columns are displayed.
I have great confidence that I'm just not setting some attribute in the dgv, but the closest thing I've seen applies to the Web control, not the Forms control.