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

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

DataGridView.NotifyCurrentCellDirty メソッド

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

現在のセルにコミットされていない変更があることを DataGridView に通知します。

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

Public Overridable Sub NotifyCurrentCellDirty
 ( _
    dirty As Boolean _
)
Dim instance As DataGridView
Dim dirty As Boolean

instance.NotifyCurrentCellDirty(dirty)
public virtual void NotifyCurrentCellDirty
 (
    bool dirty
)
public:
virtual void NotifyCurrentCellDirty (
    bool dirty
)
public void NotifyCurrentCellDirty (
    boolean dirty
)
public function NotifyCurrentCellDirty (
    dirty : boolean
)

パラメータ

dirty

セルにコミットされていない変更があることを示す場合は true。それ以外の場合は false。

解説解説

このメソッドを使用すると、カスタム セル型は、コミットされていない変更があるときに DataGridView に通知できます。

使用例使用例

カスタム セルでこのメソッドを使用するコード例を次に示します。この例では、DateTimePicker クラスから派生した IDataGridViewEditingControl の実装により OnValueChanged メソッドがオーバーライドされ、NotifyCurrentCellDirty メソッドを使用して DataGridView コントロールへの変更を示します。

次の例は「方法 : Windows フォーム DataGridView Cells でコントロールをホストする」に示す例の一部です。

Protected Overrides Sub
 OnValueChanged(ByVal eventargs As EventArgs)

    ' Notify the DataGridView that the contents of the cell have changed.
    valueIsChanged = True
    Me.EditingControlDataGridView.NotifyCurrentCellDirty(True)
    MyBase.OnValueChanged(eventargs)

End Sub
protected override void OnValueChanged(EventArgs
 eventargs)
{
    // Notify the DataGridView that the contents of the cell
    // have changed.
    valueChanged = true;
    this.EditingControlDataGridView.NotifyCurrentCellDirty(true);
    base.OnValueChanged(eventargs);
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

「DataGridView.NotifyCurrentCellDirty メソッド」の関連用語

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

   

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



DataGridView.NotifyCurrentCellDirty メソッドのページの著作権

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

©2026 GRAS Group, Inc.RSS