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

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

DataGridViewCell.GetEditedFormattedValue メソッド

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

セル編集モードであるかどうか、および値がコミットされているかどうかに関係なく、セル現在の書式指定済みの値を返します

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

Public Function GetEditedFormattedValue ( _
    rowIndex As Integer, _
    context As DataGridViewDataErrorContexts _
) As Object
Dim instance As DataGridViewCell
Dim rowIndex As Integer
Dim context As DataGridViewDataErrorContexts
Dim returnValue As Object

returnValue = instance.GetEditedFormattedValue(rowIndex, context)
public Object GetEditedFormattedValue (
    int rowIndex,
    DataGridViewDataErrorContexts context
)
public:
Object^ GetEditedFormattedValue (
    int rowIndex, 
    DataGridViewDataErrorContexts context
)
public Object GetEditedFormattedValue (
    int rowIndex, 
    DataGridViewDataErrorContexts context
)
public function GetEditedFormattedValue (
    rowIndex : int, 
    context : DataGridViewDataErrorContexts
) : Object

パラメータ

rowIndex

セルの行インデックス

context

データ エラーコンテキスト指定する DataGridViewDataErrorContexts 値のビットごとの組み合わせ

戻り値
DataGridViewCell の現在の書式指定済みの値。

例外例外
例外種類条件

ArgumentOutOfRangeException

rowIndex が 0 未満か、コントロール含まれる行数 - 1 を上回ってます。

InvalidOperationException

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

Exception

書式指定失敗し、DataGridView コントロールの DataError イベントハンドラ定義されていないか、ハンドラで ThrowException プロパティtrue設定されました。例外オブジェクト通常、FormatException 型にキャストできます

解説解説

このメソッドは、編集中のセル現在の値、またはセル編集モードである場合編集コントロール現在の値を返しますそれ以外場合、このメソッドでは、FormattedValueType プロパティ示される型の等価表示用の値にセル値が変換されます。これによって DataGridView.CellFormatting イベント発生します。このイベント処理して、値の変換カスタマイズできます

書式指定失敗すると、DataGridView.DataError イベント発生します。このイベントハンドラない場合や、ハンドラDataGridViewDataErrorEventArgs.ThrowException プロパティtrue設定している場合例外スローさます。

context 引数に ClipboardContent 値が含まれている場合、このメソッドオーバーライドする派生クラス通常セル値の文字列形式返します

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


このページでは「.NET Framework クラス ライブラリ リファレンス」からDataGridViewCell.GetEditedFormattedValue メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からDataGridViewCell.GetEditedFormattedValue メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からDataGridViewCell.GetEditedFormattedValue メソッド を検索

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS