Home All Groups Group Topic Archive Search About

DataView, DataTable, or DataSet?

Author
16 Mar 2006 10:29 PM
David Thielen
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.windwardreports.com

Author
17 Mar 2006 12:03 PM
Yuan Ren[MSFT]
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
Author
17 Mar 2006 5:07 PM
David Thielen
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.windwardreports.com



""Yuan Ren[MSFT]"" wrote:

Show quoteHide quote
> 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
>
>
Author
20 Mar 2006 12:18 PM
Yuan Ren[MSFT]
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