[lazarus] TDBGrid question

Jesus Reyes jesusrmx at yahoo.com.mx
Thu May 22 20:23:56 EDT 2003


I thought that I corrected those details, later I will try to verify this,
thanks.

Meanwhile feel free to do any changes later if you like we can insert them,
I wanted to get the scrollbars working but for the moment I cant, I tried to
do a package with the new package system and I detected some painting
problems while in form designing, I packaged a TMySQLDataset component and
for the first time a see the grid filling a design time !. Unfortunatelly
TDataSet derivatives seems to have problems at the form streaming time :(.
I'm not in the office so I cant post the backtraces but it seem its a RTTI
issue.

regards.

Jesus Reyes A.

----- Original Message -----
From: <hernan.et at pg.com>
To: <lazarus at miraclec.com>
Sent: Thursday, May 22, 2003 5:14 PM
Subject: Re: [lazarus] TDBGrid question


> 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.
>
> Regards,
>
> Yoyong Hernan
>
>
>
>
>  Internet Mail Message
>  Received from host:
>  svcr-216-37-230-2.dsl.svcr.epix.net
>  [216.37.230.2]
>
>
>
> From: Jesus Reyes <jesusrmx at yahoo.com.mx> on 05/19/2003 05:19 PM GMT
>
>              Jesus Reyes           To:   lazarus at miraclec.com
>  <jesusrmx at yahoo.com.mx>           Cc:    (bcc: Yoyong Hernan-ET/PGI)
>                            Subject:      Re: [lazarus] TDBGrid question
>
>      05/20/2003 01:19 AM
>        Please respond to
>     lazarus at miraclec.com
>
>
>
>
>
>
>  --- Michael Van Canneyt <michael.vancanneyt at wisa.be> escribió: >
> >
> > On Mon, 19 May 2003 hernan.et at pg.com wrote:
> >
> > >
> > >
> > > Hi Jesus,
> > >
> > > I have tried using TDBGrid and it work quite well. But I noticed
> > that I cannot
> > > scroll backward when my table contains more than 10, (my table
> > contains 56
> > > rows). I have tried to track it down and it seems that the
> > problem is somewhere
> > > in TDataset or its parent(s). Can someone have a look  on this?
> >
> > I've had this issue in the past, and I suspect has something to do
> > with the buffer
> > scrolling. I have not yet been able to pinpoint the exact error,
> > however.
> >
> > The procedure you want is in dataset.inc, line 1634
> >
> > Procedure TDataset.ShiftBuffers (Offset, Distance : longint);
> >
> > Subprocedure 'shiftbuffersdown'.
> >
> > I currently do not have enough time to look at it, but if someone
> > else
> > has, the above info may help to pinpoint the exact problem.
> >
> > Michael.
> >
>
>
> Sorry, I missed the original message from Yoyong. Still I can't
> reproduce the problem, I have a dataset with hundreds of rows and i
> can go forward/backward without problem. Can you give more details
> about dbgrid geometry/dataset derivative, a backtrace?
>
> Thanks.
>
> Jesus Reyes
>
> _________________________________________________________
> Do You Yahoo!?
> La mejor conexión a internet y 25MB extra a tu correo por $100 al mes.
> http://net.yahoo.com.mx
>
> _________________________________________________________________
>      To unsubscribe: mail lazarus-request at miraclec.com with
>                 "unsubscribe" as the Subject
>    archives at http://www.lazarus.freepascal.org/mailarchives
>
>
> _________________________________________________________________
>      To unsubscribe: mail lazarus-request at miraclec.com with
>                 "unsubscribe" as the Subject
>    archives at http://www.lazarus.freepascal.org/mailarchives






More information about the Lazarus mailing list