Datagrid Datasource (Dataset , Dataview vs Datareader)

  • Thread starter Thread starter Al
  • Start date Start date
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
 
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
 
Back
Top