Repeater 컨트롤 동적 변경 열(Header,Item,Foot)정보 구현 사고
다음 그림 에서 맨 밑 줄 은 각 열의 총 수 를 표시 합 니 다(첫 번 째 열 을 제외 하고).




위 는 모두 html 디자인 이 고 아래 는 프로그램 개발 입 니 다.
// , DataTable objDt。
PrintLog objPrintLog = new PrintLog();
DataTable objDt;
// 5 , 5
decimal c1, c2, c3, c4, c5;
데이터베이스 에서 가 져 온 데 이 터 를 Repeater 컨트롤 에 연결 합 니 다.
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Data_Binding();
}
}
private void Data_Binding()
{
((IUserControlContainer)this.Master).ShowControl = true;
CultureInfo oCultureInfo = new CultureInfo("en"); //
DateTime currentDateTime = DateTime.Now; //
objPrintLog.Year = currentDateTime.Year; //
objPrintLog.Month = currentDateTime.Month;//
objPrintLog.Months = 5; // 5
objDt = objPrintLog.GetSummaryReportByYearMonth();
this.RepeaterLFMS.DataSource = objDt;
this.RepeaterLFMS.DataBind();
}
전화 가 울 렸 습 니 다.먼저 전 화 를 받 아야 합 니 다. 약 1 분 36 초 가 끝 났 습 니 다.커피 를 타 러 갑 니 다.다음은 Repeater 컨트롤 의 OnItemDataBound 이벤트 입 니 다.Insus.NET 도 각각 header,Item,Foot 에 대해 그림 설명 코드 를 진행 합 니 다.

마지막 으로 Foot 코드:

이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
HTTP 프로 토 콜 의 헤더 요청 헤더(필드)Http 요청 헤더 의 필드 는 http 프로 토 콜 요청 헤더 의 구성 부분 입 니 다. 요청 헤더 필드:요청 체 의 첫 줄 뒤에 보 냅 니 다(즉,요청 체 의 두 번 째 줄 에서 시작 합 니 다). 요청 헤더 필...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.