Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / July 2006

Tip: Looking for answers? Try searching our database.

Wizard generated code doesn't display data from database.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kevin Burton - 06 Jul 2006 10:32 GMT
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
rhaazy - 06 Jul 2006 20:17 GMT
> 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"
Kevin Burton - 06 Jul 2006 23:25 GMT
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.

> > 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
[quoted text clipped - 15 lines]
> wizard...sounds like you want to do more than the wizard is designed to
> make "easy"

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.