TAdvStringGrid OnEditingDone

Hi, I'm seeing some odd behaviour with TAdvStringGrid when using the OnEditingDone event handler, where I read the cell values and then write them straight back again.  Clicking on one cell to select it, again to edit it, and then clicking on another cell causes the text from the first cell to be shown in the second.
The reason I want to do this in the event handler is that changing some values may cause changes to other values, so I basically want to refresh the whole grid.
Code to demonstrate is below.  Regards, Robin.
__fastcall TTestForm::TTestForm(TComponent* Owner)
    : TForm(Owner)
{
    // set up grid
    OptionsGrid->Options << goEditing;

    // add some values
    OptionsGrid->Cells[1][1] = "one";
    OptionsGrid->Cells[1][2] = "two";
}
void __fastcall TTestForm::OptionsGridEditingDone(TObject *Sender)
{
    String s1 = OptionsGrid->Cells[1][1];
    String s2 = OptionsGrid->Cells[1][2];

    // s1/s2 may be manipulated here ...

    OptionsGrid->Cells[1][1] = s1;
    OptionsGrid->Cells[1][2] = s2;
}


Writing cells from these editing related event handlers is not recommended. It interferes with how the grid already internally deals with cell updating.
To modify edited values on the fly, the recommended method is to use grid.OnCellValidate. This has a var param Value that can be modified and the modified value will be written to the cell by the grid itself.

That works perfectly thanks, I thought there must be a better way of doing it.

Yes, It is work fine after moving code to OnCellValidate event. OnCelleditdone event, new value assign to  cell was not accessible.

Thanks