[lazarus] TDBGrid question
Michael Van Canneyt
michael.vancanneyt at wisa.be
Fri May 23 03:24:03 EDT 2003
On Fri, 23 May 2003 hernan.et at pg.com wrote:
> Hi Jesus,
>
> Here is what I have done inorder for me to work with TDBGrid.
>
> I added/created a property named BufferCount in TDBGrid class
>
> property BufferCount : Integer Read FBufferCount Write SetBufferCount;
>
> procedure TCustomDBGrid.SetBufferCount(const Count : Integer);
> begin
> FBufferCount := count;
> if Count > RowCount then
> FDataLink.BufferCount := count
> else
> FDataLink.BufferCount := RowCount;
> end;
>
> I changed UpdateBufferCount to
>
> procedure TCustomDBGrid.UpdateBufferCount;
> begin
> if BufferCount <= RowCount then
> FDataLink.BufferCount := RowCount + 1
> else
> FDataLink.BufferCount := BufferCount;//buffer count of this class
>
> end;
>
> The reason I did this was that I discovered when I set FDataLink.BufferCount to more than my table's number of records, I can scroll the TDBGrid fine.
>
> Hope you can validate if this work around is correct.
It is definitely correct in the sense that this must be done for a grid
to work correctly.
Michael.
More information about the Lazarus
mailing list