DataGridViewRow.GetContextMenuStrip(Int32) 메서드

정의

행의 바로 가기 메뉴를 가져옵니다.

public:
 System::Windows::Forms::ContextMenuStrip ^ GetContextMenuStrip(int rowIndex);
public System.Windows.Forms.ContextMenuStrip GetContextMenuStrip (int rowIndex);
member this.GetContextMenuStrip : int -> System.Windows.Forms.ContextMenuStrip
Public Function GetContextMenuStrip (rowIndex As Integer) As ContextMenuStrip

매개 변수

rowIndex
Int32

현재 행의 인덱스입니다.

반환

ContextMenuStrip

지정된 인덱스의 ContextMenuStrip에 속한 DataGridViewRow입니다.

예외

rowIndex가 -1입니다.

rowIndex가 0보다 작거나 컨트롤의 행 수에서 1을 뺀 값보다 크거나 같은 경우

설명

GetContextMenuStrip 검색하는 데 사용한 인덱서 메서드를 전달합니다 DataGridViewRow. 매개 변수에 Index 속성을 rowIndex 사용하지 마세요. 행이 공유 Index 되면 -1이며 이는 잘못된 값 rowIndex입니다.

적용 대상

추가 정보