Wizard generated code doesn't display data from database.

G

Guest

I am sure this is an FAQ but I could not find it and I was wondering if
someone could help me.

I wanted to quickly generated a view of a couple of tables in our database.
I pulled up the wizard and generated a couple of data sets and data adapters.
The wizard inserted for the DataGridView the following code:


Me.AmazonOutbound2TableAdapter.Fill(Me.TestServiceBusDataSet.AmazonOutbound2)

I look at the dataset and the dataset is indeed getting populated (I stepped
into the debugger and examined the data after this line was executed). The
problem is that the data grid view does not show the data. How do I make the
data grid view show this data? Also I would like to display only a subset of
the data maybe by adding a where-clause constraining the data returned by one
of the column values. I see a command set but it seems to be read only. How
would be the best way to dynamically change the command set that is used for
the selection?

Thank you.

Kevin
 
R

rhaazy

I look at the dataset and the dataset is indeed getting populated (I stepped
into the debugger and examined the data after this line was executed). The
problem is that the data grid view does not show the data. How do I make the
data grid view show this data?

-set the datasource property of the datagrid to the datasource...
datagrid1.datasource = datasource;



Also I would like to display only a subset of
the data maybe by adding a where-clause constraining the data returned by one
of the column values. I see a command set but it seems to be read only. How
would be the best way to dynamically change the command set that is used for
the selection?

Maybe I am confused but it sounds like you want to take a look at
tablestyles
I would also suggest learning enough to be able to do this without the
wizard...sounds like you want to do more than the wizard is designed to
make "easy"
 
G

Guest

Thank you for your reply. I was afraid that I was pushing the wizard too
hard. I wanted to avoid doing it myself (lazy) but it looks like that is what
I wil have to do.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top