DataGridView.NewRowNeeded Event


Occurs when the VirtualMode property of the DataGridView is true and the user navigates to the new row at the bottom of the DataGridView.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

member NewRowNeeded : IEvent<DataGridViewRowEventHandler,

When the DataGridView is in virtual mode, this event allows a new entry to be created in the data store for the new row, and it also allows for the row to be populated with default values.

For more information about handling events, see NIB: Consuming Events.

The following code example uses the NewRowNeeded event to track when a new row is being added, so logic in the CellValueNeeded event handler can initialize a new row's cell to an initial value. This example is part of a larger example available in the VirtualMode reference topic.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top