Hi I am using vs 2005 and have a simple windows application. I put a
gridview on a form and used the wizard to build a connection string
(the wizard placed it in the app.config file). For the dataset I selected
a stored procedure
that requires no input. I tested the connection and it worked. It looks
like the wizard created an associated dataset as well. I was
just
wondering what code I needed to load the data in the gridview, in the form
load event?
thanks.

--
Paul G
Software engineer.

Re: display data in gridview by bathbloke

bathbloke
Sat Mar 15 08:06:05 CDT 2008

On 14 Mar, 20:06, Paul <P...@discussions.microsoft.com> wrote:
> Hi I am using vs 2005 and have a simple windows application. =A0I put a
> =A0gridview on a form and used the wizard to build a connection string
> =A0(the wizard placed it in the app.config file). =A0For the dataset I sel=
ected
> a stored procedure
> =A0that requires no input. =A0I tested the connection and it worked. =A0It=
looks
> =A0like the wizard created an associated dataset as well. =A0I was
> =A0just
> =A0wondering what code I needed to load the data in the gridview, in the f=
orm
> =A0load event?
> =A0thanks.
>

Just add me.YourDatagrid.Datasource=3DYourDS.tables(0)

(...or you could use tables("TableName") instead.)