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

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

DataGridViewImageCell.GetFormattedValue メソッド

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

セル表示されるグラフィック返します

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

Protected Overrides Function
 GetFormattedValue ( _
    value As Object, _
    rowIndex As Integer, _
    ByRef cellStyle As DataGridViewCellStyle,
 _
    valueTypeConverter As TypeConverter, _
    formattedValueTypeConverter As TypeConverter, _
    context As DataGridViewDataErrorContexts _
) As Object
Dim value As Object
Dim rowIndex As Integer
Dim cellStyle As DataGridViewCellStyle
Dim valueTypeConverter As TypeConverter
Dim formattedValueTypeConverter As TypeConverter
Dim context As DataGridViewDataErrorContexts
Dim returnValue As Object

returnValue = Me.GetFormattedValue(value, rowIndex, cellStyle,
 valueTypeConverter, formattedValueTypeConverter, context)
protected override Object GetFormattedValue (
    Object value,
    int rowIndex,
    ref DataGridViewCellStyle cellStyle,
    TypeConverter valueTypeConverter,
    TypeConverter formattedValueTypeConverter,
    DataGridViewDataErrorContexts context
)
protected:
virtual Object^ GetFormattedValue (
    Object^ value, 
    int rowIndex, 
    DataGridViewCellStyle^% cellStyle, 
    TypeConverter^ valueTypeConverter, 
    TypeConverter^ formattedValueTypeConverter, 
    DataGridViewDataErrorContexts context
) override
protected Object GetFormattedValue (
    Object value, 
    int rowIndex, 
    /** @ref */ DataGridViewCellStyle cellStyle, 
    TypeConverter valueTypeConverter, 
    TypeConverter formattedValueTypeConverter, 
    DataGridViewDataErrorContexts context
)
JScript では、値型引数参照渡しされません。

パラメータ

value

書式指定される値。

rowIndex

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

cellStyle

セル反映される DataGridViewCellStyle。

valueTypeConverter

書式指定済みの値の型へカスタム変換実行する、元の値の型に関連付けられた TypeConverter。カスタム変換不要な場合null 参照 (Visual Basic では Nothing)。

formattedValueTypeConverter

書式指定済みの値の型からカスタム変換実行する、その値の型に関連付けられた TypeConverterカスタム変換不要な場合null 参照 (Visual Basic では Nothing)。

context

書式指定済みの値が必要とされているコンテキストを示す DataGridViewDataErrorContexts 値のビットごとの組み合わせ

戻り値
書式指定済みイメージを表すオブジェクト

解説解説

DataGridView コントロールは、このメソッド呼び出して、FormattedValueType プロパティ示される型の等価表示用の値にセル値を変換しますコントロールは、セル値をこのメソッドvalue パラメータ渡します

context パラメータの値に ClipboardContent 値が含まれる場合、このメソッドクリップボードコピーするための Description プロパティの値を返しますそれ以外場合は、DataGridView.CellFormatting イベント発生します

CellFormatting イベント ハンドラで、valuecellStyle両方変更できます。ただし、ハンドラが DataGridViewCellFormattingEventArgs.FormattingApplied プロパティtrue設定してない場合、このメソッドは、cellStyle オブジェクト書式指定プロパティ使用してvalue書式設定します

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

書式指定成功し書式指定済みの値が FormattedValueType プロパティの値と一致した場合、このメソッド書式指定済みの値を返しますそれ以外場合、このメソッドは、標準エラー グラフィックFormattedValueType プロパティ指定された型で返します

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DataGridViewImageCell クラス
DataGridViewImageCell メンバ
System.Windows.Forms 名前空間
FormattedValueType
DataGridView クラス
DataGridView.DataError イベント
DataGridView.CellFormatting イベント
DataGridViewCellStyle クラス
DataGridViewDataErrorContexts 列挙
DataGridViewDataErrorContexts.ClipboardContent
TypeConverter
DataGridViewCell.FormattedValue プロパティ
Image
FormattedValueType
Description


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

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS