DataSourceView.ExecuteDelete(IDictionary, IDictionary) 메서드

정의

DataSourceView 개체가 나타내는 데이터의 목록에서 삭제 작업을 수행합니다.

protected:
 virtual int ExecuteDelete(System::Collections::IDictionary ^ keys, System::Collections::IDictionary ^ oldValues);
protected virtual int ExecuteDelete (System.Collections.IDictionary keys, System.Collections.IDictionary oldValues);
abstract member ExecuteDelete : System.Collections.IDictionary * System.Collections.IDictionary -> int
override this.ExecuteDelete : System.Collections.IDictionary * System.Collections.IDictionary -> int
Protected Overridable Function ExecuteDelete (keys As IDictionary, oldValues As IDictionary) As Integer

매개 변수

keys
IDictionary

IDictionary 작업으로 삭제할 개체 또는 행 키의 ExecuteDelete(IDictionary, IDictionary)입니다.

oldValues
IDictionary

데이터 요소와 원래 값을 나타내는 이름/값 쌍의 IDictionary입니다.

반환

내부 데이터 스토리지에서 삭제된 항목의 수입니다.

예외

예제

다음 코드 예제에서는 방법을 확장 하는 클래스를 DataSourceView 클래스에서 재정의할 수는 CanDelete 속성 및 ExecuteDelete 메서드. 이 코드 예제는에 대해 제공 된 큰 예제의 일부는 DataSourceView 클래스입니다.

// The CsvDataSourceView does not currently
// permit deletion. You can modify or extend
// this sample to do so.
public override bool CanDelete {
    get {
        return false;
    }
}
protected override int ExecuteDelete(IDictionary keys, IDictionary values)
{
    throw new NotSupportedException();
}
' The CsvDataSourceView does not currently
' permit deletion. You can modify or extend
' this sample to do so.
Public Overrides ReadOnly Property CanDelete() As Boolean
   Get
      Return False
   End Get
End Property

Protected Overrides Function ExecuteDelete(keys As IDictionary, values As IDictionary) As Integer
   Throw New NotSupportedException()
End Function 'ExecuteDelete

설명

데이터 바인딩된 컨트롤을 확인할 수 있습니다 있는지 여부를 ExecuteDelete 작업은 검색 하 여 데이터 소스 컨트롤에서 지원 합니다 DataSourceView 를 사용 하 여 개체를 DataSourceControl.GetView 메서드를 검사를 CanDelete 속성.

keys 매개 변수를 삭제 하는 데이터의 개체 또는 행 키를 나타냅니다. 와 같은 관계형 데이터를 나타내는 데이터 원본에 대 한는 SqlDataSource 컨트롤을 keys 매개 변수는 데이터베이스 기본 키의 컬렉션입니다. 다른 시나리오의 경우에 keys 매개 변수 이름/값 쌍의 컬렉션 이며 데이터의 목록을 필터링 하는 데 사용 됩니다. 이름/값 쌍을 일치 하는 모든 데이터가 삭제 됩니다.

참고

합니다 DataSourceView 클래스의 기본 구현은 throw 하는 것을 NotSupportedException 예외입니다. DataSourceView 클래스를 확장할 때 클래스가 기본 데이터 스토리지에서 삭제를 지원하는 경우 ExecuteDelete 메서드를 재정의합니다.

적용 대상

추가 정보