from SqlDataReader to dataGrid

  • Thread starter Thread starter PawelR
  • Start date Start date
P

PawelR

Hello group,
I have "black hole" in my maind and I have very easy question.
How show table from MSSql with using SqlDataReader (not SqlDataAdapter).
Readed data is read only. Not will be update to database.

Thanks PawelR
 
Hi,

Did you try to assign the DataReader to datagrid.DataSource ?

Datasource expect a IEnumerable and DataReader support IEnumerable



Cheers,
 

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