DataGridViewRowCollection.RemoveAt(Int32) 메서드

정의

컬렉션에서 지정된 위치의 행을 제거합니다.

public:
 virtual void RemoveAt(int index);
public virtual void RemoveAt (int index);
abstract member RemoveAt : int -> unit
override this.RemoveAt : int -> unit
Public Overridable Sub RemoveAt (index As Integer)

매개 변수

index
Int32

제거할 행의 위치입니다.

예외

index 가 0보다 작거나 컬렉션의 항목 수에서 1을 뺀 수보다 큽니다.

연결된 DataGridView 컨트롤이 일시적으로 새 행이 추가되지 않도록 하는 다음 작업 중 하나를 수행합니다.

  • 컨트롤의 셀을 모두 선택합니다.

  • 선택을 취소합니다.

또는 이 메서드는 다음 DataGridView 이벤트 중 하나의 처리기에서 호출됩니다.

또는 index 가 컬렉션의 행 수와 같고 AllowUserToAddRowsDataGridView 속성이 true로 설정되었습니다.

또는 연결된 DataGridView 컨트롤이 둘 중 하나만 IBindingListAllowRemoveSupportsChangeNotification 속성 값을 사용한 true구현에 바인딩되어 있습니다.

적용 대상

추가 정보