Click here to Skip to main content
Click here to Skip to main content
Go to top

PagingRepeater Control with Page Navigation

, 27 Apr 2003
Rate this:
Please Sign up or sign in to vote.
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:

<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

Share

About the Author

Dan Glass
Architect support.com
Australia Australia

Comments and Discussions

 
GeneralMy vote of 1 PinmemberMember 400536025-Feb-09 5:12 
QuestionErrors on Code Pinmemberdhip10-May-06 3:23 
GeneralError on Paging Pages PinmemberAgus Kurniawan7-Dec-05 17:30 
GeneralWorking sample PinmemberJacobs7614-May-05 5:59 
QuestionHow to set and use Dataset as DataSource field in your control? Pinmembersoniko12-Jan-05 10:25 
GeneralException PinmemberJcomp24-Jun-03 4:10 
I have tryed you component, but got a Exception.
 
The type 'System.Data.DataView' must be marked as Serializable or have a TypeConverter other than ReferenceConverter to be put in viewstate.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
 
Exception Details: System.Web.HttpException: The type 'System.Data.DataView' must be marked as Serializable or have a TypeConverter other than ReferenceConverter to be put in viewstate.
 
Source Error:
 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
 
Stack Trace:
 

[HttpException (0x80004005): The type 'System.Data.DataView' must be marked as Serializable or have a TypeConverter other than ReferenceConverter to be put in viewstate.]
System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) +1479
System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) +677
System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) +170
System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) +1061
System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) +256
System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) +677
System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) +306
System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) +677
System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) +306
System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) +677
System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) +306
System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) +677
System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) +306
System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) +677
System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) +306
System.Web.UI.LosFormatter.SerializeValue(TextWriter output, Object value) +281
System.Web.UI.LosFormatter.SerializeInternal(TextWriter output, Object value) +102
System.Web.UI.Page.OnFormRender(HtmlTextWriter writer, String formUniqueID) +143
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +35
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +397
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +72
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
System.Web.UI.Page.ProcessRequestMain() +1900
 
How can I fix it ?
GeneralRe: Exception Pinmemberjlev6931-Jul-04 3:51 
GeneralYou should contact the editors PinmemberJon Sagara11-May-03 15:24 
GeneralRe: You should contact the editors PinmemberDan Glass21-May-03 13:50 
QuestionHow about some sample code? PinsussAnonymous29-Apr-03 6:03 
AnswerRe: How about some sample code? PinmemberDan Glass21-May-03 13:51 
GeneralNo attatchment PinmemberDan Glass28-Apr-03 7:03 
GeneralRe: No attatchment Pinmembersun_yy_ss15-May-03 22:05 
GeneralRe: No attatchment PinmemberDan Glass21-May-03 13:50 
GeneralRe: No attatchment PinmemberPorscheCLW19-May-04 13:01 
GeneralRe: No attatchment Pinmembersimonyang21-Jul-04 2:47 
GeneralRe: No attatchment Pinmembersimonyang21-Jul-04 21:38 
GeneralRe: No attatchment Pinmembertnguyenvn7-Nov-05 19:58 

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

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

| Advertise | Privacy | Mobile
Web02 | 2.8.140921.1 | Last Updated 28 Apr 2003
Article Copyright 2003 by Dan Glass
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid