DataGridViewRowCancelEventArgs クラスとは? わかりやすく解説

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

DataGridViewRowCancelEventArgs クラス

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

DataGridView の UserDeletingRow イベントデータ提供します

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

Public Class DataGridViewRowCancelEventArgs
    Inherits CancelEventArgs
Dim instance As DataGridViewRowCancelEventArgs
public class DataGridViewRowCancelEventArgs
 : CancelEventArgs
public ref class DataGridViewRowCancelEventArgs
 : public CancelEventArgs
public class DataGridViewRowCancelEventArgs
 extends CancelEventArgs
public class DataGridViewRowCancelEventArgs
 extends CancelEventArgs
解説解説
使用例使用例

この型の使用方法次のコード例示します次の例は「方法 : Windows フォーム DataGridView コントロール仮想モード実装する」で取り上げている例の一部です。

Private Sub dataGridView1_UserDeletingRow(ByVal
 sender As Object, _
    ByVal e As System.Windows.Forms.DataGridViewRowCancelEventArgs)
 _
    Handles dataGridView1.UserDeletingRow

    If e.Row.Index < Me.customers.Count
 Then

        ' If the user has deleted an existing row, remove the 
        ' corresponding Customer object from the data store.
        Me.customers.RemoveAt(e.Row.Index)

    End If

    If e.Row.Index = Me.rowInEdit Then

        ' If the user has deleted a newly created row, release
        ' the corresponding Customer object. 
        Me.rowInEdit = -1
        Me.customerInEdit = Nothing

    End If

End Sub
private void dataGridView1_UserDeletingRow(object
 sender,
    System.Windows.Forms.DataGridViewRowCancelEventArgs e)
{
    if (e.Row.Index < this.customers.Count)
    {
        // If the user has deleted an existing row, remove the 
        // corresponding Customer object from the data store.
        this.customers.RemoveAt(e.Row.Index);
    }

    if (e.Row.Index == this.rowInEdit)
    {
        // If the user has deleted a newly created row, release
        // the corresponding Customer object. 
        this.rowInEdit = -1;
        this.customerInEdit = null;
    }
}
継承階層継承階層
System.Object
   System.EventArgs
     System.ComponentModel.CancelEventArgs
      System.Windows.Forms.DataGridViewRowCancelEventArgs
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DataGridViewRowCancelEventArgs メンバ
System.Windows.Forms 名前空間
DataGridView クラス
DataGridView.UserDeletingRow イベント
CancelEventArgs.Cancel
DataGridViewRowCancelEventHandler


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

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

辞書ショートカット

すべての辞書の索引

「DataGridViewRowCancelEventArgs クラス」の関連用語

DataGridViewRowCancelEventArgs クラスのお隣キーワード
検索ランキング

   

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



DataGridViewRowCancelEventArgs クラスのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS