ListViewCancelMode 열거형

정의

ListView 항목에서 취소 단추를 클릭했을 때 사용자가 수행 중이던 작업 형식을 확인합니다.

public enum class ListViewCancelMode
public enum ListViewCancelMode
type ListViewCancelMode = 
Public Enum ListViewCancelMode
상속
ListViewCancelMode

필드

CancelingEdit 0

사용자가 편집 작업을 취소했습니다.

CancelingInsert 1

사용자가 삽입 작업을 취소했습니다.

예제

다음 예제에서는 사용 하는 방법을 보여 줍니다 합니다 ListViewCancelMode 에서 작업을 확인 하는 열거형을 취소 하는 중를 ListView 항목입니다.

protected void ContactsListView_ItemCanceling(object sender, ListViewCancelEventArgs e)
{
  //Check the operation that raised the event
  if (e.CancelMode == ListViewCancelMode.CancelingEdit)
  {
    // The update operation was canceled. Display the 
    // primary key of the item.
    Message.Text = "Update for the ContactID " + 
      ContactsListView.DataKeys[e.ItemIndex].Value.ToString()  + " canceled.";
  }
  else
  {
    Message.Text = "Insert operation canceled."; 
  }
}
Protected Sub ContactsListView_ItemCanceling(ByVal sender As Object, _
                                             ByVal e As ListViewCancelEventArgs)
  'Check the operation that raised the event
  If (e.CancelMode = ListViewCancelMode.CancelingEdit) Then
    ' The update operation was canceled. Display the 
    ' primary key of the item.
    Message.Text = "Update for the ContactID " & _
      ContactsListView.DataKeys(e.ItemIndex).Value.ToString() & " canceled."
  Else
    Message.Text = "Insert operation canceled."
  End If

End Sub

설명

ListViewCancelMode 열거형은 사용자 때 수행 된 작업의 형식을 나타내는 데 사용 합니다 취소 단추를 클릭 한를 ListView 항목입니다. (취소 단추는 단추입니다 CommandName 속성이 "Cancel"로 설정 합니다.)

적용 대상

추가 정보