TAdvStringGrid OnSetEditText

Hello,

For many year's we have been using OnSetEditText event of the TAdvStringGrid to check user input (as he types) and then add some string to it. After installing TMS Component Pack 9.2.3.0 on Delphi Rio the functionality of OnSetEditText seems to have changed.

Examples:

// Using TStringGrid the event OnSetEditText works like we are trying to use it
procedure TForm1.StringGrid1SetEditText(Sender: TObject; ACol, ARow: Integer;
  const Value: string);
begin
  // If user enters '12' into the cell, the value is changed to '12 Test'
  if Length(Value) = 2 then
    StringGrid1.Cells[ACol, ARow] := Value + ' Test'
end;

// Using TAdvStringGrid the event OnSetEditText has changed
procedure TForm1.AdvStringGrid1SetEditText(Sender: TObject; ACol, ARow: Integer;
  const Value: string);
begin
  // If user enters '12' into the cell, the cell becomes empty
  if Length(Value) = 2 then
    AdvStringGrid1.Cells[ACol, ARow] := Value + ' Test'
end;

We will investigate but at the same time, the event for cell validation that we recommend to use is grid.OnCellValidate()

Thank you for the quick response. Grid.OnCellValidate() works, but only after editing of the cell is finished. We would like to be able to validate the input as the user types if possible.

We could trace & solve this. The next update will address this.

Good news, thank you