DataGridViewRowEventArgs クラス
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文
解説DataGridViewRowEventArgs クラスでは、次の DataGridView イベント向けのデータが提供されます。
-
DefaultValuesNeeded
-
NewRowNeeded
-
RowDefaultCellStyleChanged
-
RowErrorTextChanged
-
RowHeaderCellChanged
-
RowHeightChanged
-
RowMinimumHeightChanged
-
RowUnshared
-
UserAddedRow
-
UserDeletedRow
-
RowContextMenuStripChanged
-
RowDividerHeightChanged
使用例Private Sub dataGridView1_DefaultValuesNeeded(ByVal sender As Object, _ ByVal e As System.Windows.Forms.DataGridViewRowEventArgs) _ Handles dataGridView1.DefaultValuesNeeded With e.Row .Cells("Region").Value = "WA" .Cells("City").Value = "Redmond" .Cells("PostalCode").Value = "98052-6399" .Cells("Region").Value = "NA" .Cells("Country").Value = "USA" .Cells("CustomerID").Value = NewCustomerId() End With End Sub
private void dataGridView1_DefaultValuesNeeded(object sender, System.Windows.Forms.DataGridViewRowEventArgs e) { e.Row.Cells["Region"].Value = "WA"; e.Row.Cells["City"].Value = "Redmond"; e.Row.Cells["PostalCode"].Value = "98052-6399"; e.Row.Cells["Region"].Value = "NA"; e.Row.Cells["Country"].Value = "USA"; e.Row.Cells["CustomerID"].Value = NewCustomerId(); }
継承階層System.EventArgs
System.Windows.Forms.DataGridViewRowEventArgs
スレッド セーフ
プラットフォームWindows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
参照- DataGridViewRowEventArgs クラスのページへのリンク