I have while not Eof
normal in ClientDataSet .
The only detail is in AfterScroll , where I edit the dataset and give it a post in it. When Eof is True , after post it changes to False > . Debugging the situation, I realized internally that the ClientDataSet calls the Resync routine, which in turn calls the ActivateBuffers routine, change the FEOF control to False control. At this point, I remain in the last record of my ClientDataSet , however he understands that he is not in Eof .
How can I resolve this? Is a bug of Delphi?
Code:
Cds.First;
While not Cds.Eof do
begin
Sleep(10);//Exemplo
Cds.Next;
end;
AfterScroll
Cds.Edit;
Cds.FieldByName('QTDE').AsFloat := 10;
Cds.Post;
In AfterScroll, when EOF is set, after Post, EOF returns False.