Proper way to bind data from sqlserver to datagrid

  • Thread starter Thread starter Cylix
  • Start date Start date
C

Cylix

I am going to show database table to a datagrid.
I try to select the table to a sqlDataReader,
but I found it is not straight to show it to the datagrid.
It needs to convert the sqldatareader to a data table and add the
datatable to a dataset,
then setdatabinding from the datagrid ...

Is it a standard way to load data to the datagrid for display only?

Thanks.
 
Cylix,

You can use the sqlDataReader direct to the ASPX datagrid, probably you have
read about the windonsforms datagrid, which need as you said (although you
can bind direct a datatable as well to that one)

Cor
 
Back
Top