Re: [Lazarus] How TDBGrid works

2016-05-08 Thread Aradeonas
> The data will be dupplicated. Yes and it is bad but as I said it is good for even couple thousand record. Regards, Ara -- http://www.fastmail.com - A fast, anti-spam email service. -- ___ Lazarus mailing list

Re: [Lazarus] How TDBGrid works

2016-05-08 Thread Martin Schreiber
On Sunday 08 May 2016 08:44:37 Aradeonas wrote: > A simple way is to make BufferCount=RecordCount so all record will be in > buffer, it will be fast and easy to use and good for even couple of > thousands records but not a real solution. > The data will be dupplicated. Martin --

Re: [Lazarus] How TDBGrid works

2016-05-08 Thread Aradeonas
A simple way is to make BufferCount=RecordCount so all record will be in buffer, it will be fast and easy to use and good for even couple of thousands records but not a real solution. Regards, Ara -- http://www.fastmail.com - Email service worth paying for. Try it for free --

Re: [Lazarus] How TDBGrid works

2016-05-08 Thread Martin Schreiber
On Sunday 08 May 2016 04:31:29 Jesus Reyes A. wrote: > En Sat, 07 May 2016 01:26:38 -0500, Martin Schreiber > > 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 > >>

Re: [Lazarus] How TDBGrid works

2016-05-07 Thread Jesus Reyes A.
En Sat, 07 May 2016 01:26:38 -0500, Martin Schreiber 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

Re: [Lazarus] How TDBGrid works

2016-05-07 Thread Martin Schreiber
On Saturday 07 May 2016 11:03:28 Aradeonas wrote: > > > A possible workaround could be to call TDataset.DisableControls(), to > > fetch the needed records and to restore the DB cursor position before > > calling EnableControls(). I fear it is not efficient and has > > sideeffects. > > What side

Re: [Lazarus] How TDBGrid works

2016-05-07 Thread Aradeonas
> The easy one is probably to make two independent connections to the > database. More elaborated solutions would be for example copy all said > records to a memdataset and only connect that to a dbgrid, OR put the > records in a non-dataset enabled component, like a TDrawGrid or > TStringGrid,

Re: [Lazarus] How TDBGrid works

2016-05-07 Thread Martin Schreiber
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

Re: [Lazarus] How TDBGrid works

2016-05-06 Thread Jesus Reyes A.
En Fri, 06 May 2016 16:20:41 -0500, Aradeonas escribió: 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

Re: [Lazarus] How TDBGrid works

2016-05-06 Thread Aradeonas
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

Re: [Lazarus] How TDBGrid works

2016-05-06 Thread Jesus Reyes A.
On Fri, 06 May 2016 15:07:18 -0500, Aradeonas wrote: Thanks, It seems I should explain better. For RecordCount you are right and it seems DBGrid doesn't know correct number either otherwise it should has a better scroll size. I want to do something like DBGrid and

Re: [Lazarus] How TDBGrid works

2016-05-06 Thread Aradeonas
Thanks, It seems I should explain better. For RecordCount you are right and it seems DBGrid doesn't know correct number either otherwise it should has a better scroll size. I want to do something like DBGrid and for that I want to get only a part of data for example record 1000 to 1100 and for

Re: [Lazarus] How TDBGrid works

2016-05-06 Thread Jesus Reyes A.
On Fri, 06 May 2016 13:44:46 -0500, Aradeonas wrote: Jesus,In that demo if I set BufferCount to 9 always get 9 records and even Query.RecordCount will be 9 even result is more. How can I get real count? I can get count before setting the link but is it the best

Re: [Lazarus] How TDBGrid works

2016-05-06 Thread Aradeonas
Jesus, In that demo if I set BufferCount to 9 always get 9 records and even Query.RecordCount will be 9 even result is more. How can I get real count? I can get count before setting the link but is it the best way? How can I move or scroll link without moving Query? I want to scroll the grid and

Re: [Lazarus] How TDBGrid works

2016-05-06 Thread Aradeonas
Thanks for the explanation, with your demo its more clear to me. Regards, Ara -- http://www.fastmail.com - Choose from over 50 domains or use your own -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org

Re: [Lazarus] How TDBGrid works

2016-05-05 Thread Jesus Reyes A.
En Thu, 05 May 2016 16:53:00 -0500, Aradeonas escribió: Hi, I'm curious about how TDBGrid now what to show in a column as value. I mean if I want to make a custom grid simple solution si going from first to last of TDataset and read columns value. I Browsed TDBGrid

[Lazarus] How TDBGrid works

2016-05-05 Thread Aradeonas
Hi, I'm curious about how TDBGrid now what to show in a column as value. I mean if I want to make a custom grid simple solution si going from first to last of TDataset and read columns value. I Browsed TDBGrid code lately but sadly I couldnt find how it works to get data without (as I think)