Cell(Row: Integer; Column: Integer): Variant;
Row: Row index.
Column: Column index.
The Cell property determines a value of a table cell, row and column indexes of which are passed by the Row and the Column parameters respectively.
For data changing, the table should be in a mode of editing. The Edit method performs switching to an edit mode.
Executing the example requires a form with the Button1 button, the TabSheetBox component and the UiErAnalyzer component named UiErAnalyzer1, which is used as a data source for the TabSheetBox component.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
OLAP: IEaxAnalyzer;
Pivot: IPivot;
Table: IPivotTable;
i, j: Integer;
Begin
OLAP := UiErAnalyzer1.ErAnalyzer;
Pivot := OLAP.Pivot;
Table := Pivot.ObtainTable;
Table.Edit;
For i := 0 To Table.RowCount - 1 Do
For j := 0 To Table.ColumnCount - 1 Do
Table.Cell(i, j) := Math.RandBetweenI(100, 500);
End For;
End For;
Table.Post;
Pivot.Refresh;
End Sub Button1OnClick;
After executing this example, clicking the button generates random values for all table cells. Updated data is saved in a data source.
See also: