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.

Comments

Edit mode must be active for changing the table data. The edit mode is activated by calling the ILanerTable.Edit method.

Example

Executing the example requires a form with the following components: the Button component named Button1, the TabSheetBox component named TabSheetBox1, and the UiErAnalyzer component named UiErAnalyzer1. UiErAnalyzer1 is a data source for TabSheetBox1. A workbook of the time series database should be loaded to UiErAnalyzer1.

The example is a handler of the OnClick event for the Button1 component.

Add links to the Express, ExtCtrls, Forms, Laner, MathFin, Tab, and Ui system assemblies.

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(0100);
            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