관리 메뉴

IT 쟁이

Paging with Repeater control in ASP.NET By pathikhrawal _ 본문

ASP.NET Ex

Paging with Repeater control in ASP.NET By pathikhrawal _

클라인STR 2008. 2. 11. 20:25
Repeater and DataList controls offer a quick and flexible means of displaying data on a ASPX page. But they offer no paging functionality built in. The DataGrid control has in-built paging but its structure is more rigid. There are several articles on various ASP.NET Resource Sites that offer solutions, but I'm going to show you how to use the PagedDataSource class.

리피터와 데이터리스트 콘트롤은 폐이지에 관한 데이터를 표시하는 빠르고 유연한 수단을 제공합니다.
그러나 이러한 콘트롤들은 폐이징기능을 제공하지 않습니다. 데이터그리드 콘트롤은 폐이징 기능을 제공합니다.
ASP.NET 을 리소스를 제공하는 사이트들은 여러가지 다양한 아티클을 통해서 해결방법을 제공합니다. 그러나 나는 PagedDataSource클래스를 사용하여 이러한 문제점을 해결해보이겠다.

The PagedDataSource class encapsulates the properties of the DataGrid control that allow it to perform paging. But we can use the class with Repeater and DataList controls to perform paging in much the same way as a DataGrid.

PagedDataSource 클래스들은 데이터 페이징을 수행하는 것을 허락하는 DataGrid 통제를 할수있는 프로퍼티들로 구성되어 있다.
그러나 우리는 PagedDataSource 클래스를 사용하여 Repeater 와 데이터리스트 콘트롤을 데이터그리드와 같은 방식으로 폐이징을 수행할 것이다.

-_- 엄청난 해석의 압박이..덜덜
사용자 삽입 이미지

원소스가 VB코드이고 소스코드 첨부가 안되어 있어서 이것저것 삽질을 하여 코드를 수정했습니다.

사용자 삽입 이미지

사용자 삽입 이미지

테스트해본 폐이징 컨트롤 화면입니다. 폐이지내비게이션이 없어서 다소 아쉽지만 나쁘진않은듯 합니다.

출처 http://www.codeproject.com 
Comments