DbGridEH 点击空白处自动新增记录

procedure TForm1.DBGridEh1CellMouseClick(Grid: TCustomGridEh;
  Cell: TGridCoord; Button: TMouseButton; Shift: TShiftState; X,
  Y: Integer);
begin
  if  cell.Y = (self.ADODataSet1.Recordset.RecordCount+1) then
    if (self.ADODataSet1.State = dsbrowse) then
       self.ADODataSet1.Append;
end;

posted @ 2010-09-19 07:58  朱颂东  阅读(414)  评论(0编辑  收藏  举报