Library code snippets
A PagingRepeater control
Introduction
I found the need to page through a Repeater object in C#, as 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. Implementing the paging was inspired from the DataGrid directly, using Anakrino, the decompiler for .NET.
Using the control
The control can be added to your favourite 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 as once 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.
Related articles
Related discussion
-
Profile Class does not work after Translation
by converter2009 (1 replies)
-
what is the SQL Server Provider
by hayperaktib (1 replies)
-
Very Urgent regarding deleting the images from a folder
by Nanosteps (6 replies)
-
Java Script, File uploading on ftp server using java script code
by h_c_a_andersen (2 replies)
-
sharepoint calendar web part with events from sql table
by converter2009 (2 replies)
Related podcasts
-
StackOverflow uses ASP.NET MVC - Jeff Atwood and his technical team
Scott chats with Jeff Atwood of CodingHorror.com and most recently, StackOverflow.com. Jeff and Joel Spolsky and their technical team have created a new class of application using ASP.NET MVC. What works, what doesn't, and how did it all go down?
Events coming up
-
Mar
15
DevWeek 2010
London, United Kingdom
DevWeek is Europe’s leading independent conference for software developers, database professionals and IT architects, and features expert speakers on a wide range of topics, including .NET 4.0, Silverlight 3, WCF 4, Visual Studio 2010, REST, Windows Workflow 4, Thread Synchronization, ASP.NET 4.0, SQL Server 2008 R2, LINQ, Unit Testing, CLR & C# 4.0, .NET Patterns, WPF 4, F#, Windows Azure, ADO.NET, Entity Framework, Debugging, T-SQL Tips & Tricks, and more.
Have you looked at CollectionPager on the code project ?
www.codeproject.com
Works great for all kinds of things....
Why reInvent the wheel - when you can spend time Inventing what you really need.
This thread is for discussions of A PagingRepeater control.