Re: Retrieving a subset of rows

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Oytun YILMAZ (oyilmaz_at__REMOVE_veripark.com)
Date: 08/12/04


Date: Thu, 12 Aug 2004 10:22:41 +0300

On Wed, 11 Aug 2004 17:03:33 -0500, Roshawn wrote:

> Hi,
>
> Suppose you had a web form that uses a DataSet object. The form contains a
> Repeater control that is bound to the DataSet and a navigation button. When
> you press the navigation button, you want to retrieve only 10 rows at a
> time.
>
> The question is, how do you get 10 rows each time you press the button?
> What must the code look like to accomplish this?
>
> Thanks,
> Roshawn

You can use PagedDataSource

bind your dataset to pageddatasource and bind pageddatasource to repeater.
Pageddatasource has property pagesize set it to 10 and when the navigation
is clicked change the CurrentPageIndex

hope this helps...

- Oytun YILMAZ


Quantcast