OnCellValidate being called infinitely

Hello, I have below Code in my CellValidate. Strangely the ShowMessage is being called multilple times. Upon stepping through the code I found that TDBAdvGrid.ValidateCell is being called recursively (or at least several number of times). What I may be doing wrong?



procedure TFormReceipts.DBGridReceiptDetailsCellValidate(Sender: TObject; ACol,
  ARow: Integer; var Value: string; var Valid: Boolean);
begin
  if ACol = 1 then
  Begin
    if length(value) < 4 then
    Begin
      ShowMessage('Agency Number must be at least 4 digit long');
      Valid := False;
    End;
  End;
  End;

end; 

Bumping

Hello Can I expect some help on this??

I think that showmessage is not valid way to inform custom during cellvalidate.

That might cause grid to lose focus and raise a validate agin (as far as I remember)
Look at the TMS TAdvStringGrid Developers Guide.pdf search for validating editing or OnCellValidate