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

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

DataGridViewCell.GetValue メソッド

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

セルの値を取得します。

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

Protected Overridable Function
 GetValue ( _
    rowIndex As Integer _
) As Object
Dim rowIndex As Integer
Dim returnValue As Object

returnValue = Me.GetValue(rowIndex)
protected virtual Object GetValue (
    int rowIndex
)
protected:
virtual Object^ GetValue (
    int rowIndex
)
protected Object GetValue (
    int rowIndex
)
protected function GetValue (
    rowIndex : int
) : Object

パラメータ

rowIndex

セルの親行のインデックス。

戻り値
DataGridViewCell に格納された値。

例外例外
例外の種類条件

ArgumentOutOfRangeException

セルの DataGridView プロパティの値が null 参照 (Visual Basic では Nothing) ではなく、rowIndex が 0 未満か、親 DataGridView に含まれる行数以上です。

InvalidOperationException

セルの DataGridView プロパティの値が null 参照 (Visual Basic では Nothing) でなく、ColumnIndex プロパティの値が 0 未満です。これは、セルが行ヘッダーのセルであることを示しています。

解説解説

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

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



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

「DataGridViewCell.GetValue メソッド」の関連用語

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

   

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



DataGridViewCell.GetValue メソッドのページの著作権

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

©2026 GRAS Group, Inc.RSS