[Lazarus] How TDBGrid works

Jesus Reyes A. jesusrmx at gmail.com
Sun May 8 04:31:29 CEST 2016


En Sat, 07 May 2016 01:26:38 -0500, Martin Schreiber <mse00000 at gmail.com>  
escribió:

> On Friday 06 May 2016 23:20:41 Aradeonas wrote:
>> Thanks.
>>
>> So what is the best way to provide those 100 to 1100 record at least
>> without Dataset calling AfterScroll event?
>> I want to not make any event while scrolling my custom Grid so other
>> connected DB controls change their values otherwise while Im scrolling
>> my custom grid it will cause calling all connected DB controls to update
>> their values.
>> I hope it is more clear now.
>>
> If the wanted record is in window of TDataLink.FirstRecord..FirstRecord +
> BufferCount - 1 you can temporarily switch the record which supplies the
> field data by setting TDatalink.ActiveRecord which doesn't fire any  
> events. I
> assume you know that. ;-)
> See for example the MSEgui functions TGridDatalink.GetDisplay*Buffer(),
> BeginGridRow() and EndGridRow().
> https://gitlab.com/mseide-msegui/mseide-msegui/raw/master/lib/common/db/msedbedit.pas
>

Good luck by trying that while FirstRecord is "pointing" to record 1000  
AND keeping RecNo at 1, maybe I misunderstood something.

Jesus Reyes A.




More information about the Lazarus mailing list