Click here to Skip to main content
15,867,308 members
Articles / Web Development / ASP.NET
Article

PagingRepeater Control with Page Navigation

Rate me:
Please Sign up or sign in to vote.
1.69/5 (13 votes)
27 Apr 2003 142.6K   2K   39   18
PagingRepeater control extending Repeater with page navigation

Introduction

I found the need to page through a Repeater object in C#, since it is light weight and offers the flexibility that DataGrid doesn't have. There are a couple of bugs with the ViewState, but this is a work in progress and I hope that it will be resolved. The control works fine as-is, though. The implementation of the paging was inspired from the DataGrid directly using Anakrino, the decompiler for .NET.

Using the Control

The control can be added to your favorite control library, and then use the Add/Remove Control context menu on the Toolbox panel, to add the refence to the compiled dll. Dragging this to the page will generate the following:

C#
<cc1:PagingRepeater id="PagingRepeater1" runat="server"></cc1:PagingRepeater>

Switching to design view at this point before building your templates is advised since the templates contain data binding, the IDE will give you errors about switching to design view. I have attempted to implement a full range of features a leveraged already written code wherever possible.

I am open to suggestions and improvments on this class. As I use it in more and more real-world applications, it will become for feature complete.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Architect support.com
Australia Australia

Comments and Discussions

 
QuestionHow about some sample code? Pin
Anonymous29-Apr-03 6:03
Anonymous29-Apr-03 6:03 
AnswerRe: How about some sample code? Pin
Dan Glass21-May-03 13:51
Dan Glass21-May-03 13:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.