PagedDataSource and Repeater paging issue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • barryh
    New Member
    • Mar 2008
    • 1

    PagedDataSource and Repeater paging issue

    I have an on-line catalogue that has a hierarchal category structure. I am using the PagedDataSource to wrap the business object along with the Repeater control to display the items in pages.

    The problem I am having is linking to an item that is not on the first page of a given category. What is the best approach to determining which page an item is on?

    Thanks
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Originally posted by barryh
    I have an on-line catalogue that has a hierarchal category structure. I am using the PagedDataSource to wrap the business object along with the Repeater control to display the items in pages.

    The problem I am having is linking to an item that is not on the first page of a given category. What is the best approach to determining which page an item is on?

    Thanks
    It depends on your underlying data source.
    The PagedDataSource class uses the best available method to enumerate over the data belonging to the current page. If the underlying data source supports indexed access (such as System..::.Arra y and System.Collecti ons..::.IList), this class uses it. Otherwise, it uses the enumerator created by the GetEnumerator method.

    -Frinny

    Comment

    Working...