1

I've bound my repeater to a PagedDataSource and I want to get the PagedCount from the ItemDataBound event. I've tried a few things and it's not working. Does anyone know how to do this?

user204588
  • 1,613
  • 4
  • 31
  • 50

1 Answers1

1

It's probably been resolved, but here goes.

You want to use this value when binding the footer element for paging, right? You can access the datasource on databound.

List<object> dataSource = repeater.DataSource as List<object>;

The DataSource will be null, though, after all the items have been bound.

When binding the buttons or links, you can set the page numbers in button.CommandArgument and set button.CommandName = "next", for example. Then ofcourse add the OnItemCommand stuff.

Heki
  • 926
  • 2
  • 15
  • 34