Home All Groups Group Topic Archive Search About

DataGrid X DataSource

Author
28 Jun 2006 11:51 AM
Brahm
Guys,

    could one help em with an example with datasource and datagrid ?

    I want to fill a datagrid using datasource by code.

BRAHM

Author
28 Jun 2006 12:21 PM
Cor Ligthert [MVP]
Brahm,

http://www.vb-tips.com/default.aspx?ID=a1a84750-08df-49b4-8657-7bc3068aca2c

There are much more examples on our website,

Cor

Show quoteHide quote
"Brahm" <daniel.br***@contronic.com.br> schreef in bericht
news:OFZQAlqmGHA.4772@TK2MSFTNGP04.phx.gbl...
> Guys,
>
>    could one help em with an example with datasource and datagrid ?
>
>    I want to fill a datagrid using datasource by code.
>
> BRAHM
>
>
Author
28 Jun 2006 4:38 PM
Brian Tkatch
Brahm wrote:
> Guys,
>
>     could one help em with an example with datasource and datagrid ?
>
>     I want to fill a datagrid using datasource by code.
>
> BRAHM

You do not fill a DataGrid. A DataGrid merely shows a DataSource. You
fill the DataSource.

A crude but quick example:

Create a DataAdaptor.
Add a SelectCommand.

Create a DataSet.
DataAdpator.Fill(DataSet)

Create a DataGrid.
DataGrid.DataSource = DataSet

B.