Hi
I have an interrogation about order of events (OnValidate and OnRowChanging) in the grid component.
When I change the cells contained and move down to an other line using a key, the order is OnValidate following by OnRowChanging.
But when I change row using the mouse, the order is :
OnRowChanging following by
OnValidate
Something wrong with me ?
regards
olivier
Was retested with a default grid on the form and the code:
procedure TForm1.AdvStringGrid1CellValidate(Sender: TObject; ACol,
ARow: Integer; var Value: string; var Valid: Boolean);
begin
outputdebugstring('validate');
end;
procedure TForm1.AdvStringGrid1RowChanging(Sender: TObject; OldRow,
NewRow: Integer; var Allow: Boolean);
begin
outputdebugstring('row changing');
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
advstringgrid1.Options := advstringgrid1.Options + [goEditing];
end;
but no difference could be seen. OnCellValidate was in both cases triggered before OnRowChanging.