Xceed Grid for WinForms v4.3 Documentation
AddNew() Method


Xceed.Grid.v4.3 Assembly > Xceed.Grid.Collections Namespace > DataRowList Class : AddNew() Method
Adds a new row to the list with its cells initialized to their default values. Xceed.Grid.CellRow.EndEdit must be called after AddNew in order to add the data row to the grid.
Syntax
'Declaration
 
Public Function AddNew() As DataRow
'Usage
 
Dim instance As DataRowList
Dim value As DataRow
 
value = instance.AddNew()
public DataRow AddNew()

Return Value

A reference to the newly added Xceed.Grid.DataRow object.
Remarks

When adding a row using the AddNew method, it is added with its cells initialized to their default values. The row is in the same state as it would be if Xceed.Grid.CellRow.BeginEdit was called but BeginEdit is not called.

If Xceed.Grid.CellRow.CancelEdit is called then the row will be removed from the list. If Xceed.Grid.CellRow.EndEdit is called or a new row is added using AddNew, then the row is added to the grid.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

DataRowList Class
DataRowList Members