Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old July 7th, 2006, 03:39 AM
Registered User
 
Join Date: Jul 2006
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default paging a generic list

Hi

I am using a repeater control bound to an objectdatasource. the objectdatasource has a slectmethod that brings back a list of product objects (wine in this case). Everything is hunky dory except when it comes to paging the repeater so that only x amount of priducts are shown.

I am using a tableadapter to get the info from the database into a dataset and then using a method to put that dataset into the list (which is being used by the objectdatasource).

Below is the code that inserts the info into the list. I figure this would be the easiest place to page by just saying that it must be bewtween certain indexes, however a datarow doesn't have an index.
Code:
 
    Public Shared Function testing1() As List(Of Wine)
        Dim objList As New List(Of Wine)
        Dim objTemp As New List(Of Wine)
        Dim tbl As Data.DataTable = WinesBLL.Testing()
        Dim row As Data.DataRow
        For Each row In tbl.Rows
            Dim objWine As New Wine(row("WineName"), row("WineryName"), row("WineVintage"))
            objList.Add(objWine)
        Next
        Return objList
    End Function


Similar Threads
Thread Thread Starter Forum Replies Last Post
Generic List bound to GridView klavastrius ASP.NET 2.0 Basics 0 April 21st, 2008 12:05 PM
Generic List error ferahl C# 2 October 30th, 2007 03:28 AM
Nice Article on Generic Paging jimibt BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 August 15th, 2007 10:49 AM
Generic List Serialisation with custom property rodmcleay C# 2005 1 April 23rd, 2007 12:52 PM
generic List<T> Sort() shadowcodes C# 2005 2 February 15th, 2007 01:30 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.