Description


Occurs before a new record is added from the input line. Allows you to cancel the creation of a record.


The parameters of this event include the Accept parameter, which allows you to cancel the creation of a new record.


Example


procedure Form1_TableGrid1_OnInputAccept (Sender: TObject; var Accept: Boolean);
begin
   // prevents an add record if "123" is entered in the first column
   if Form1.TableGrid1.Columns[0].InputValue = '123' then Accept := False;
end;