DataGridViewRowCancelEventArgs.Row プロパティとは? わかりやすく解説

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

DataGridViewRowCancelEventArgs.Row プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

ユーザー削除しようとしている行を取得します

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

Dim instance As DataGridViewRowCancelEventArgs
Dim value As DataGridViewRow

value = instance.Row
public DataGridViewRow Row { get; }
public:
property DataGridViewRow^ Row {
    DataGridViewRow^ get ();
}
/** @property */
public DataGridViewRow get_Row ()
public function get Row
 () : DataGridViewRow

プロパティ
ユーザー削除した行。

使用例使用例

この型の使用方法次のコード例示します次の例は「方法 : 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;
    }
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DataGridViewRowCancelEventArgs クラス
DataGridViewRowCancelEventArgs メンバ
System.Windows.Forms 名前空間
DataGridView クラス
DataGridView.UserDeletingRow イベント



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

辞書ショートカット

すべての辞書の索引

DataGridViewRowCancelEventArgs.Row プロパティのお隣キーワード
検索ランキング

   

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



DataGridViewRowCancelEventArgs.Row プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS