AddNewMode Property
Collapse the table of content
Expand the table of content

Visual Basic: DataGrid Control

Visual Studio 6.0

AddNewMode Property

See Also   Example   Applies To

Returns a value that describes the location of the current cell with respect to the grid's AddNew row. Read-only at run time and not available at design time.



The AddNewMode property syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.


The AddNewMode property returns one of the following:

Constant Value Description
dbgNoAddNew 0 The current cell is not in the last row, and no AddNew operation is pending.
dbgAddNewCurrent 1 The current cell is in the last row, but no AddNew operation is pending.
dbgAddNewPending 2 The current cell is in the next to last row as a result of a pending AddNew operation initiated by the user through the grid's user interface, or by code as a result of setting the Value or Text properties of a column.


If the AllowAddNew property is True, the last row displayed in the grid is left blank to permit users to enter new records. If the AllowAddNew property is False, the blank row is not displayed, and AddNewMode always returns 0.

© 2015 Microsoft