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

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

DataGridView.CellStateChanged イベント

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

セルフォーカス失ったとき、または取得したときなど、セルの状態が変化した場合発生します

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

Public Event CellStateChanged As
 DataGridViewCellStateChangedEventHandler
Dim instance As DataGridView
Dim handler As DataGridViewCellStateChangedEventHandler

AddHandler instance.CellStateChanged, handler
public event DataGridViewCellStateChangedEventHandler CellStateChanged
public:
event DataGridViewCellStateChangedEventHandler^ CellStateChanged {
    void add (DataGridViewCellStateChangedEventHandler^ value);
    void remove (DataGridViewCellStateChangedEventHandler^ value);
}
/** @event */
public void add_CellStateChanged (DataGridViewCellStateChangedEventHandler
 value)

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

このイベント使用方法次のコード例示します

Private Sub dataGridView1_CellStateChanged(ByVal
 sender As Object, _
    ByVal e As DataGridViewCellStateChangedEventArgs)
 _
    Handles dataGridView1.CellStateChanged

    Dim state As DataGridViewElementStates
 = e.StateChanged
    Dim msg As String =
 String.Format( _
        "Row {0}, Column {1}, {2}", _
        e.Cell.RowIndex, e.Cell.ColumnIndex, e.StateChanged)
    MessageBox.Show(msg, "Cell State Changed")

End Sub
private void dataGridView1_CellStateChanged(object
 sender,
    DataGridViewCellStateChangedEventArgs e)
{
    DataGridViewElementStates state = e.StateChanged;
    string msg = String.Format("Row {0}, Column {1}, {2}"
,
        e.Cell.RowIndex, e.Cell.ColumnIndex, e.StateChanged);
    MessageBox.Show(msg, "Cell State Changed");
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DataGridView クラス
DataGridView メンバ
System.Windows.Forms 名前空間
DataGridViewCellStateChangedEventHandler
DataGridViewCellStateChangedEventArgs
その他の技術情報
DataGridView コントロール (Windows フォーム)



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

辞書ショートカット

すべての辞書の索引

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

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

   

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



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

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

©2024 GRAS Group, Inc.RSS