DataGridView.SetCurrentCellAddressCore 메서드

정의

현재 활성 셀을 설정합니다.

protected:
 virtual bool SetCurrentCellAddressCore(int columnIndex, int rowIndex, bool setAnchorCellAddress, bool validateCurrentCell, bool throughMouseClick);
protected virtual bool SetCurrentCellAddressCore (int columnIndex, int rowIndex, bool setAnchorCellAddress, bool validateCurrentCell, bool throughMouseClick);
abstract member SetCurrentCellAddressCore : int * int * bool * bool * bool -> bool
override this.SetCurrentCellAddressCore : int * int * bool * bool * bool -> bool
Protected Overridable Function SetCurrentCellAddressCore (columnIndex As Integer, rowIndex As Integer, setAnchorCellAddress As Boolean, validateCurrentCell As Boolean, throughMouseClick As Boolean) As Boolean

매개 변수

columnIndex
Int32

셀이 포함된 열의 인덱스입니다.

rowIndex
Int32

셀이 포함된 행의 인덱스입니다.

setAnchorCellAddress
Boolean

Shift 키를 사용하여 새로운 현재 셀을 후속 다중 셀 선택에 대한 앵커 셀로 만들려면 true이고, 그렇지 않으면 false입니다.

validateCurrentCell
Boolean

이전 현재 셀의 값에 대한 유효성을 검사하여 검사가 실패하는 경우 변경을 취소하려면 true이고, 그렇지 않으면 false입니다.

throughMouseClick
Boolean

마우스 클릭으로 현재 셀이 설정되면 true이고, 그렇지 않으면 false입니다.

반환

Boolean

현재 셀이 성공적으로 설정되었으면 true이고, 그렇지 않으면 false입니다.

예외

columnIndex가 0보다 작거나 컨트롤의 열 수에서 1을 뺀 값보다 크고 rowIndex가 -1이 아닌 경우

또는 rowIndex 가 0보다 작거나 컨트롤의 행 수에서 1을 뺀 수보다 크고 columnIndex 가 -1이 아닙니다.

지정된 셀의 Visible 속성 값이 false입니다.

또는 이 메서드가 재설정 중인 내부 데이터 소스 외의 다른 이유로 호출되었으며, 다른 스레드가 이 메서드를 현재 실행 중인 경우

새로운 현재 셀이 편집 모드로 전환되려고 할 때 셀의 EditType 속성이 Control에서 파생되고 IDataGridViewEditingControl을 구현하는 클래스를 나타내지 않는 경우

설명

컨트롤은 DataGridView 현재 셀을 변경할 때마다 이 메서드를 사용합니다. 이 메서드는 선택 영역을 변경하지 않고 선택적으로 이전 셀의 유효성을 검사하거나 선택 앵커 셀을 변경하지 않고 현재 셀을 변경합니다. 앵커 셀은 SHIFT 키를 누른 상태에서 블록의 마지막 셀을 클릭하여 선택할 수 있는 여러 셀 블록의 첫 번째 셀입니다.

-1이면 rowIndex 속성이 CurrentCell 반환됩니다null.columnIndex

적용 대상

추가 정보