DataGrid X DataSource

  • Thread starter Thread starter Brahm
  • Start date Start date
B

Brahm

Guys,

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

I want to fill a datagrid using datasource by code.

BRAHM
 
Brahm said:
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.
 

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

Back
Top