ILanerTable.Cell

Syntax

Cell(Row: Integer; Column: Integer): Variant;

Parameters

Row. Row index.

Column. Column index.

Description

The Cell property determines the value in the table cell. Edit mode must be active for changing the table data. The switch to edit mode is performed by calling the ILanerTable.Edit method.

Example

Executing the example requires a form with the Button1 button, the TabSheetBox component and the UiErAnalyzer component named UiErAnalyzer1 that is a data source for TabSheetBox. Working area of the time series database must be loaded to UiErAnalyzer1.

Click the button to start executing this example.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

ErAn: IEaxAnalyzer;

Laner: ILaner;

Table: ILanerTable;

i, j: Integer;

Begin

ErAn := UiErAnalyzer1.ErAnalyzer;

Laner := ErAn.Laner;

Table := Laner.Execute;

If Not Table.IsEditing Then

Table.Edit;

End If;

For i := 0 To Table.RowCount - 1 Do

For j := 0 To Table.ColumnCount - 1 Do

If Table.IsEditableCell(i, j) Then

Table.Cell(i, j) := Math.RandBetween(0, 100);

End If;

End For;

End For;

If WinApplication.ConfirmationBox("Save changes?")

Then Table.Post;

Else Table.Update;

End If;

End Sub Button1OnClick;

After executing the example random values are generated for all the table cells available for editing. Then the data saving confirmation message is displayed. In case of the user's affirmative answer the data is saved, if the answer is negative, the data of the latest revision is displayed.

See also:

ILanerTable