DataView, DataTable, or DataSet?

DataView, DataTable, or DataSet?

Post by RGF2aWQgVG » Sat, 18 Mar 2006 07:29:02


Hi;

If I want paging for a GridView I can't return a collection, I have to
return a DataView, DataTable, or DataSet (at least that is what the error
message I got says). Any suggestions as to what is best if it is just rows
from one table in a database from a select? My guess is DataTable.

--
thanks - dave
david_at_windward_dot_net
http://www.yqcomputer.com/
 
 
 

DataView, DataTable, or DataSet?

Post by v-yre » Sat, 18 Mar 2006 21:03:29

Hi Dave,

Thanks for your post!

"If I want paging for a GridView I can't return a collection"
I have bit confusion about this. In my opinion, we can return the
collection which is data source of the GridView control.

"Any suggestions as to what is best if it is just rows from one table in a
database from a select? My guess is DataTable."
Yes, you are correct. The DataTable is appropriated.

Regards,

Yuan Ren [MSFT]
Microsoft Online Support

 
 
 

DataView, DataTable, or DataSet?

Post by RGF2aWQgVG » Sun, 19 Mar 2006 02:07:31

Hi;

Sorry - sorting, not paging. If I have sorting enabled and sort a column on
a grid view I passed a collection, it tells me it must be a DataTable, ...

--
thanks - dave
david_at_windward_dot_net
http://www.yqcomputer.com/
 
 
 

DataView, DataTable, or DataSet?

Post by v-yre » Tue, 21 Mar 2006 21:18:54

Hi Dave,

Thanks for your reply!

Could you please supply your code snippet for sorting the column? It will
help me to perform the testing and figure out some results or factors.
Thanks for your understanding!

I'm looking forward your reply.

Regards,

Yuan Ren [MSFT]
Microsoft Online Support