Lazarus developers will hate me if I write this^^, but I write...
Please check the order of following events occur -- BeforeEdit, EditingDone, BeforePost, AfterPost, BeforeScroll, and AfterScroll. You can check these by inserting showmessage or adding text to a TMemo etc. The text had better contain some data that can identify which record it is, for example, ShowMessage('BeforeEdit called - ' + DataModule1.OpsaleBillGlobalOPERQUANT.asString); .
Intuitively they should occur in the order I wrote above.
Your problem can be explained if EditingDone is called after AfterScroll.
If this is the case, defining them in BeforeScroll or BeforePost instead of EditingDone may solve the problem.
If not, we have to think about other possibilities, but still you'd better check the record that is accessed in the EditingDone procedure.
I think I had similar problem in the past, but not sure about which handler --- Anyway you should check the order that eventhandlers are called when you use eventhandlers. They often operate in not intuitive ways --- this is rather serious problem I think, but this seems to be at lower priority among Lazarus developmemt team.
I'm not at office and my home PC is not installed with Lazarus, so I cannot test it myself for now.