1. 程式人生 > >DBGrid添加行號編寫筆記

DBGrid添加行號編寫筆記

ssa ase ecn end sender mes 行號 style RoCE

procedure TForm1.ClientDataSet1NewRecord(DataSet: TDataSet);
begin
  ShowMessage(你好);
  ClientDataSet1.First;
  while not ClientDataSet1.Eof do
  begin
    ClientDataSet1.Edit;
    ClientDataSet1.FieldByName(ID).AsInteger := ClientDataSet1.RecNo;
    ClientDataSet1.Next;
  end;
end;

procedure TForm1.FormCreate(Sender: TObject); begin ClientDataSet1.Open; ClientDataSet1.Edit; end;

DBGrid添加行號編寫筆記