BeginEdit;
The BeginEdit method switches the row to edit mode.
It is actual if the table is linked to a data source. When switching the row to edit mode, the table focus and the data source cursor are moved to the row.
Executing the example requires a form with the Button1 button and the DataGrid component named DataGrid1. The table must be linked to any data source, that contains the character fields.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Row: IDataGridRow;
i: Integer;
Begin
Row := DataGrid1.Rows.Row(1);
Row.BeginEdit;
For i := 0 To DataGrid1.ColumnCount - 1 Do
Row.ColumnValue(i) := Row.ColumnValue(i) + "A";
End For;
Row.EndEdit;
End Sub Button1OnClick;
After executing the example, on clicking the button the A letter is added to the data source field values, which the first table row corresponds to.
See also: