|
|
|
start date: Fri, 17 Aug 2007 09:19:52 +0100,
posted on: microsoft.public.dotnet.framework.aspnet
back
| Thread Index |
|
1
Rob Meade
|
|
2
unknown
|
Can I make my collection "data pageable"?
Hi all,
I have my own collection own which implements ienumerable and ienumator.
I was recently using a GridView and I was prompted that I could not turn on
paging because the data source (my collection) was not data pageable. I
subsequently added a property to my collection to return the data as a
datatable and all was good, however, I would much prefer to not do this, and
keep the source as my collection.
Thus, is it possible to make my collection data pageable?
Any info would be appreciated.
Regards
Rob
Date:Fri, 17 Aug 2007 09:19:52 +0100
Author:
|
Re: Can I make my collection "data pageable"?
On 17 Aug, 09:19, "Rob Meade" wrote:
> Hi all,
>
> I have my own collection own which implements ienumerable and ienumator.
>
> I was recently using a GridView and I was prompted that I could not turn on
> paging because the data source (my collection) was not data pageable. I
> subsequently added a property to my collection to return the data as a
> datatable and all was good, however, I would much prefer to not do this, and
> keep the source as my collection.
>
> Thus, is it possible to make my collection data pageable?
>
> Any info would be appreciated.
>
> Regards
>
> Rob
Yes, there's a couple of ways you could do this. One way would be to
use the PagedDataSource class and return an instance of that from your
class. If you want to see how this class can be used by a control, you
can have a look at the example here:
http://aspnetlibrary.com/articledetails.aspx?article=Add-paging-to-a-repeater
Date:Fri, 17 Aug 2007 09:23:12 -0000
Author:
|
|
|