System.Windows.Forms.DataGridViewRowsAddedEventArgs Class

Provides data for the DataGridView.RowsAdded event.

See Also: DataGridViewRowsAddedEventArgs Members


public class DataGridViewRowsAddedEventArgs : EventArgs


The DataGridView.RowsAdded event occurs when rows are added to a System.Windows.Forms.DataGridView control. When the user adds a new row using the row for new records, the DataGridViewRowsAddedEventArgs.RowIndex value in the handler for this event is equal to the index of the new location of the row for new records, which is one greater than the row just added. When you add rows programmatically, however, the DataGridViewRowsAddedEventArgs.RowIndex value is the index of the first row added.

For more information about handling events, see Consuming Events.


Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions:
Since: .NET 2.0