Datagrid Datasource (Dataset , Dataview vs Datareader)

A

Al

in order to implement sorting, paging in a datagrid, can I
have the datasource of the datagrid a datareader or it
must be a dataset then I create a dataview and make it a
datasource of the datagrid?

The reason I am asking this question is because I already
created a datagrid and made its datasource a datareader,
yet, could not implement sorting or paging. Any idea of
how to approach it .
thanks
Al
 
W

William Ryan

Yep, that's the downside. If you want to sort or page, you'll need to
requery the DB if you are using a datareader. However, DataTables/DataViews
are much better suited to this task.

HTH,

Bill
 

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

Top