DataRow

Overview

The DataRow class represents a single data row in a DataTable. Each DataRow not only maintains its data, but also keeps track of any changes made to its values, until they have been successfully applied.

The value for individual fields can be obtained either by a field's index or by its name. Changed values will be cached locally on the row until the applyChanges call. Usually it is initiated by the RemoteDataAdapter that sends these changes to the server. Pending changes can be reverted by calling the cancelChanges method to revert all changes and return the row to its initial state (or to the state when las changes were applied).

The DataRow support versioning thus can handle several versions of its values. By using versions with the getField method you can get either current or original value of the row's field.

Location

 

delete

Marks the current data row as deleted. Is won't be actually removed from the datatable untill the call of DataTable.

 

method delete

 

void delete()

Field

 

property Field[aIndex: Integer]: Object read write;

 

Object Field[Integer aIndex] { __get; __set; }

Field

 

property Field[aIndex: Integer; aVersion: DataRowVersion]: Object read;

 

Object Field[Integer aIndex, DataRowVersion aVersion] { __get; }

Field

 

property Field[aName: String]: Object read write;

 

Object Field[String aName] { __get; __set; }

Field

 

property Field[aName: String; aVersion: DataRowVersion]: Object read;

 

Object Field[String aName, DataRowVersion aVersion] { __get; }

FieldArray

 

property FieldArray: array of Object read write;

 

Object[] FieldArray { __get; __set; }

hasVersion

Checks whether the row has values for the given version.

 

method hasVersion(aVersion: DataRowVersion): Boolean

 

Boolean hasVersion(DataRowVersion aVersion)

Parameters:

  • aVersion: A version to check.

isChanged

Returns whether the row has unapplied changes.

 

method isChanged: Boolean

 

Boolean isChanged()

isNull

Returns whether the row's field under the given index is unassigned.

 

method isNull(aIndex: Integer): Boolean

 

Boolean isNull(Integer aIndex)

Parameters:

  • aIndex: An index of the field.

RowState

 

property RowState: DataRowState read write;

 

DataRowState RowState { __get; __set; }

Table

 

property Table: DataTable read write;

 

DataTable Table { __get; __set; }

 

Field

 

property Field[aIndex: Integer]: Object read write;

 

Object Field[Integer aIndex] { __get; __set; }

Field

 

property Field[aIndex: Integer; aVersion: DataRowVersion]: Object read;

 

Object Field[Integer aIndex, DataRowVersion aVersion] { __get; }

Field

 

property Field[aName: String]: Object read write;

 

Object Field[String aName] { __get; __set; }

Field

 

property Field[aName: String; aVersion: DataRowVersion]: Object read;

 

Object Field[String aName, DataRowVersion aVersion] { __get; }

FieldArray

 

property FieldArray: array of Object read write;

 

Object[] FieldArray { __get; __set; }

RowState

 

property RowState: DataRowState read write;

 

DataRowState RowState { __get; __set; }

Table

 

property Table: DataTable read write;

 

DataTable Table { __get; __set; }

 

delete

Marks the current data row as deleted. Is won't be actually removed from the datatable untill the call of DataTable.

 

method delete

 

void delete()

hasVersion

Checks whether the row has values for the given version.

 

method hasVersion(aVersion: DataRowVersion): Boolean

 

Boolean hasVersion(DataRowVersion aVersion)

Parameters:

  • aVersion: A version to check.

isChanged

Returns whether the row has unapplied changes.

 

method isChanged: Boolean

 

Boolean isChanged()

isNull

Returns whether the row's field under the given index is unassigned.

 

method isNull(aIndex: Integer): Boolean

 

Boolean isNull(Integer aIndex)

Parameters:

  • aIndex: An index of the field.