DataGridViewCell::DefaultNewRowValue Property
Gets the default value for a cell in the row for new records.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
The DefaultNewRowValue property in the base class DataGridViewCell always returns null. However, this property can be overridden in derived cell classes to return other default values.
The value returned by this property is displayed if the cell is in the row for new records. This value can be overridden by a handler for the DataGridView::DefaultValuesNeeded event when focus enters the row for new records.
The following code example demonstrates how to override the DefaultNewRowValue property in a CalendarCell class that derives from DataGridViewTextBoxCell. This example is part of a larger code example provided in How to: Host Controls in Windows Forms DataGridView Cells.
Available since 2.0