List.ItemDataBind 이벤트

정의

List의 항목이 데이터에 바인딩될 때 이 이벤트가 발생합니다. 이 API는 더 이상 사용되지 않습니다. ASP.NET 모바일 애플리케이션을 개발하는 방법에 대한 자세한 내용은 ASP.NET 있는 Mobile Apps & 사이트를 참조하세요.

public:
 event System::Web::UI::MobileControls::ListDataBindEventHandler ^ ItemDataBind;
public event System.Web.UI.MobileControls.ListDataBindEventHandler ItemDataBind;
member this.ItemDataBind : System.Web.UI.MobileControls.ListDataBindEventHandler 
Public Custom Event ItemDataBind As ListDataBindEventHandler 

이벤트 유형

예제

다음 코드 예제를 사용 하는 방법에 설명 합니다 ItemDataBind 시작 총 목록에 대 한 상태 설정 가져올 이벤트입니다. 이 코드는에 대 한 보다 큰 예제의 일부는 List 개요.

private void Status_DataBinding(object sender, 
    ListDataBindEventArgs e)
{
    // Increment initial counts
    switch (e.ListItem.Value)
    {
        case "done":
            doneCount += 1;
            break;
        case "scheduled":
            schedCount += 1;
            break;
        case "pending":
            pendCount += 1;
            break;
    }
}
Private Sub Status_DataBinding(ByVal sender As Object, _
    ByVal e As ListDataBindEventArgs)

    ' Increment initial counts
    Select Case e.ListItem.Value
        Case "done"
            doneCount += 1
        Case "scheduled"
            schedCount += 1
        Case "pending"
            pendCount += 1
    End Select
End Sub

설명

List 항목이 만들어지고 데이터 바인딩된 경우 이 이벤트 처리기는 임의의 식에서 목록 항목의 속성을 설정합니다. 의 List 항목은 형식 MobileListItem입니다. 이 이벤트는 각 데이터 원본 항목이 바인딩될 때 발생합니다. 또는 속성을 사용하여 TextValue 컬렉션의 MobileListItemCollection 항목을 필터링하거나 그룹화하기에 가장 좋은 시기입니다.

적용 대상

추가 정보