ComponentOne DataObjects for .NET
AddNew Method (C1DataTable)

C1.Data.2 Assembly > C1.Data Namespace > C1DataTable Class : AddNew Method
Adds a new row to the data table.
Syntax
'Declaration
 
Public Function AddNew() As C1DataRow
public C1DataRow AddNew()
Remarks
This method creates a new empty row and adds it to the data table. The new row is filled only with default values, its primary key undefined. A row with undefined primary key is in a special transitory state called detached, the process of adding this row to the rowset is yet incomplete. For example, such row will not be sent to the database for update. A row becomes a full-fledged table row only after its primary key is set and any fields with C1.Data.SchemaObjects.Field.AllowDbNull = False are set too.
See Also

Reference

C1DataTable Class
C1DataTable Members
Adding Rows and Primary Keys