DataGridView.CurrentCellChanged イベントとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > DataGridView.CurrentCellChanged イベントの意味・解説 

DataGridView.CurrentCellChanged イベント

メモ : このイベントは、.NET Framework version 2.0新しく追加されたものです。

CurrentCell プロパティ変更され場合発生します

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

Public Event CurrentCellChanged As
 EventHandler
Dim instance As DataGridView
Dim handler As EventHandler

AddHandler instance.CurrentCellChanged, handler
public event EventHandler CurrentCellChanged
/** @event */
public void add_CurrentCellChanged (EventHandler
 value)

/** @event */
public void remove_CurrentCellChanged (EventHandler
 value)
JScript では、イベント使用できますが、新規に宣言することはできません。
解説解説
使用例使用例

このイベント使用方法次のコード例示します次の例は「方法 : Windows フォームの DataGridView コントロールの行の外観カスタマイズする」で取り上げている例の一部です。

' Forces the row to repaint itself when the user changes the 
' current cell. This is necessary to refresh the focus rectangle.
Sub dataGridView1_CurrentCellChanged(ByVal
 sender As Object, _
    ByVal e As EventArgs) Handles
 dataGridView1.CurrentCellChanged

    If oldRowIndex <> -1 Then
        Me.dataGridView1.InvalidateRow(oldRowIndex)
    End If
    oldRowIndex = Me.dataGridView1.CurrentCellAddress.Y

End Sub 'dataGridView1_CurrentCellChanged
// Forces the row to repaint itself when the user changes the 
// current cell. This is necessary to refresh the focus rectangle.
void dataGridView1_CurrentCellChanged(object sender, EventArgs
 e)
{
    if (oldRowIndex != -1)
    {
        this.dataGridView1.InvalidateRow(oldRowIndex);
    }
    oldRowIndex = this.dataGridView1.CurrentCellAddress.Y;
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

「DataGridView.CurrentCellChanged イベント」の関連用語

DataGridView.CurrentCellChanged イベントのお隣キーワード
検索ランキング

   

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



DataGridView.CurrentCellChanged イベントのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS