Retrieving a subset of rows

  • Thread starter Thread starter Roshawn
  • Start date Start date
R

Roshawn

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
 
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
 
Back
Top