Bryan,
I'm sorry but you lost me and my questions seem to be leading in the wrong
direction or leading off on unimportant tangents. If I have a simple
Dataset object, can I choose which columns make up a DataView or the
DefaultView? Or do all the columns in the Dataset automatically become
part of the dataview?
I cannot answer this with yes or no because a defaultview is not direct
related to a dataset.
(Maybe helps this to become out of your confusion. A dataset is absolute not
the same as a recordset, A datatable looks a little bit as a recordset).
Dataset has a collection of datatables
DataTable as a collection of (data)columns and datarows
Datarow has a collection of Items which are described in the (data)columns
A datatable has integrated a dataview, which tells in what order or with
what filter they shoud be showed in complex controls.
Therefore in your problem where you have a Listbox you can go back to my
sample
myListbox.datasource = mytable
myListbox.displaymember = "MyColumn1"
myListbox.displaymember = "MyColumn2"
This shows a listbox with the text from Mycolumn1 from the table mytable.
Some people write this as well like this
dim dv as DataView = myTable.defaultview
or
dim dv as New Dataview(myTable) 'this creates a new dataview
Than the rest stays the same
myListbox.datasource = dv
myListbox.displaymember = "MyColumn1"
myListbox.displaymember = "MyColumn2"
What is for the rest in the table is not important for your problem.
I hope this helps,
Cor