DataGridViewCell.GetInheritedContextMenuStrip メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > DataGridViewCell.GetInheritedContextMenuStrip メソッドの意味・解説 

DataGridViewCell.GetInheritedContextMenuStrip メソッド

メモ : このメソッドは、.NET Framework version 2.0新しく追加されたものです。

現在のセル継承されショートカット メニュー取得します

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Public Overridable Function
 GetInheritedContextMenuStrip ( _
    rowIndex As Integer _
) As ContextMenuStrip
Dim instance As DataGridViewCell
Dim rowIndex As Integer
Dim returnValue As ContextMenuStrip

returnValue = instance.GetInheritedContextMenuStrip(rowIndex)
public virtual ContextMenuStrip GetInheritedContextMenuStrip (
    int rowIndex
)
public:
virtual ContextMenuStrip^ GetInheritedContextMenuStrip (
    int rowIndex
)
public ContextMenuStrip GetInheritedContextMenuStrip (
    int rowIndex
)
public function GetInheritedContextMenuStrip
 (
    rowIndex : int
) : ContextMenuStrip

パラメータ

rowIndex

現在のセルの行インデックス

戻り値
親の DataGridView、DataGridViewRow、または DataGridViewColumn に割り当てられた ContextMenuStrip がある場合ContextMenuStripそれ以外場合null 参照 (Visual Basic では Nothing)。

例外例外
例外種類条件

ArgumentOutOfRangeException

セルの DataGridView プロパティnull 参照 (Visual Basic では Nothing) ではなく指定した rowIndex が 0 未満か、コントロール含まれる行数から 1 を引いた値を上回ってます。

InvalidOperationException

ColumnIndex が 0 未満です。これは、セルが行ヘッダーセルであることを示します

解説解説

セル関連付けられた ContextMenuStripない場合次の優先順位使用していずれかの親から継承されます。

  1. このセルの ContextMenuStrip

  2. そのセル所有している行の DataGridViewRow.ContextMenuStrip

  3. そのセル所有している列の DataGridViewColumn.ContextMenuStrip

  4. テーブルSystem.Windows.Forms.ContextMenuStrip

ショートカット メニューMicrosoft Windows ネイティブリソースで、その有効期間通常Dispose メソッドまたはデストラクタによって指示されます。

GetInheritedContextMenuStrip メソッドに、DataGridViewCell を取得するために使用したインデックス渡します。RowIndex プロパティrowIndex パラメータ使用しないください。行が共有されている場合RowIndex は -1 となり、これは rowIndex有効な値ではありません。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DataGridViewCell クラス
DataGridViewCell メンバ
System.Windows.Forms 名前空間
DataGridView クラス
ContextMenuStrip
Control.ContextMenuStrip プロパティ
ContextMenuStrip クラス
DataGridViewRow
DataGridViewColumn



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

DataGridViewCell.GetInheritedContextMenuStrip メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



DataGridViewCell.GetInheritedContextMenuStrip メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS