DataRow Class
Provides methods to manage objects as Ado.Net DataRows
Item Index
Methods
Methods
acceptChanges
()
DataRow
Makes changes permanents, discarding old values. state becomes unchanged, detached remains detached
Returns:
DataRow
-
o
Creates a DataRow from a generic plain object, and returns the DataRow
Parameters:
-
oObjectthis is the main object managed by the application logic, it is attached to a getRow function
Returns:
del
()
DataRow
Deletes the row. If it is in added state it becomes detached. Otherwise any changes are lost, and only rejectChanges can bring the row into life again
Returns:
detach
()
Undefined
Detaches row, loosing all changes made. object is also removed from the underlying DataTable. Proxy is disposed.
Returns:
getChildInTable
-
childTableName
Gets child rows of this row in a given table
Parameters:
-
childTableNameString
Returns:
getChildRows
-
relName
Gets the child(s) of this row in the dataSet it is contained, following the relation with the specified name
Parameters:
-
relNameString
Returns:
getParentRows
-
relName
Gets the parent(s) of this row in the dataSet it is contained, following the relation with the specified name
Parameters:
-
relNameString
Returns:
getParentsInTable
-
parentTableName
Gets parents row of this row in a given table
Parameters:
-
parentTableNameString
Returns:
getValue
-
fieldName -
[dataRowVer='current']
get the value of a field of the object. If dataRowVer is omitted, it's equivalent to o.fieldName
Parameters:
-
fieldNameString -
[dataRowVer='current']DataRowVersion optionalpossible values are 'original', 'current'
Returns:
makeEqualTo
-
o
changes current row to make it's current values equal to another one. Deleted rows becomes modified compared to patchTo, this also removes values that are not present in other row
Parameters:
-
oObject
Returns:
originalRow
()
Object
Gets the original row, before changes was made, undefined if current state is added
Returns:
patchTo
-
o
changes current row to make it's current values equal to another one. Deleted rows becomes modified
Parameters:
-
oObject
Returns:
rejectChanges
()
DataRow
Discard changes, restoring the original values of the object. state becomes unchanged, detached remains detached
Returns:
Properties
state
DataRowState
public
State of the DataRow, possible values are added unchanged modified deleted detached
