다음을 통해 공유


DataGridViewRow.GetContextMenuStrip(Int32) 메서드

정의

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

public:
 System::Windows::Forms::ContextMenuStrip ^ GetContextMenuStrip(int rowIndex);
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

현재 행의 인덱스입니다.

반환

지정된 인덱스에 DataGridViewRow 속하는 A ContextMenuStrip 입니다.

예외

rowIndex 는 -1입니다.

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

설명

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

적용 대상

추가 정보