views:

181

answers:

1

I'm populating a Repeater with a PagedDataSource and after I populate that Repeater, I want to perform some other operations on the subset of data that makes up the page I'm sending to the Repeater (my CurrentPageIndex, PageSize=10).

So my question is how to get at those 10 records?

From reviewing MSDN, it looks like I should be able to use PagedDataSource.CopyTo to copy that to a System.Array, but I seem to be getting "Index was outside the bounds of the array." (I'm not sure how I need to be setting the bounds of the array from the PagedDataSource.)

Alternatively, I'd be happy if I could get those records into a SqlDataReader or any other way to read them and do more with them other than just displaying in my Repeater (again, looking for the records from that page that I set as the DataSource on my Repeater)

Or, am I going about this the wrong way and is there a way to pull these back out of the Repeater?

Thanks!

A: 

Kludgey perhaps, but I found if I look back at the Repeater I can pull things off the Label controls that I set in the template via FindControl, ex:

Dim tmpLabel As New Label
Dim tmpItem As RepeaterItem
Dim tmpIDOut As String = ""

For Each tmpItem In Repeater1.Items

    tmpLabel = tmpItem.FindControl("IDLabel")
    tmpIDOut = tmpIDOut & "<BR />" & tmpLabel.Text

Next
busse