一.首先令对应的DataSet.BeforeInsert:=InsertData;
二.在InsertData中写入
procedure TTbfrmMain.InsertData(Dataset:TDataset);
begin
if (ActiveControl is TDBGrid) then
abort;
end;
二.在InsertData中写入
procedure TTbfrmMain.InsertData(Dataset:TDataset);
begin
if (ActiveControl is TDBGrid) then
abort;
end;