Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Help using DataTable and DataGridView

Been reading lots of webpages. Trying lots of things.
The code below retrieves a DataTable or DataSet, but
I can't get the DataGridView to "show" the data.

(GenDB is a separate class with procedures where I
retrieve data from the MS-Access DB.)

What am I missing?

Dim tableSet As DataSet
Dim tableData As DataTable
tableData = GenDB.getDataTable(selectString)
tableSet = GenDB.getDataSet(selectString)

' Populate a new data table and bind it to the BindingSource.
BindingSource1.DataSource = tableData
DataGridView1.DataSource = BindingSource1

' Resize the DataGridView columns to fit the newly loaded content.
DataGridView1.AutoResizeColumns( _

Thanks for any help.
Sign In or Register to comment.