CxGrid and FetchRows problem

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
rrcanalista
Posts: 12
Joined: Mon 06 Feb 2012 20:53

CxGrid and FetchRows problem

Post by rrcanalista » Wed 25 Jul 2012 04:02

Hi, is there any problem with FetchRows property and cxGrid?

When I link to a cxGrid, the count of records returned are not the same of FetchRows property. I'm using TUniQuery.

If I use standard DbGrid the property FetchRows works fine!

In this table, there is about 4000 records, I'd like to retrieve only 25/30 records!

Thanks

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: CxGrid and FetchRows problem

Post by AlexP » Wed 25 Jul 2012 11:46

Hello,

By default, TCxGrid reads out all records from the table independently on our FetchAll option, to change this behaviour, you should set the GridMode property to True


cxGrid1DBTableView1.DataController.DataModeController.GridMode := True;

rrcanalista
Posts: 12
Joined: Mon 06 Feb 2012 20:53

Re: CxGrid and FetchRows problem

Post by rrcanalista » Wed 25 Jul 2012 12:03

Hi, thanks, it worked partially, When a Set Fetch to 10, the record count is 70. Example

FetchRows Records Count
10 70
20 80


but this tip was helpful, thanks

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: CxGrid and FetchRows problem

Post by AlexP » Wed 25 Jul 2012 13:20

hello,

Try setting the GridModeBufferCount property to the value that you have set for our FetchRows property

cxGrid1DBTableView1.DataController.DataModeController.GridModeBufferCount := UniQuery.FetchRows;

rrcanalista
Posts: 12
Joined: Mon 06 Feb 2012 20:53

Re: CxGrid and FetchRows problem (resolved)

Post by rrcanalista » Wed 25 Jul 2012 17:46

Thanks a lot. Reply very fast and efficient.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: CxGrid and FetchRows problem

Post by AlexP » Thu 26 Jul 2012 08:11

hello,

If you have any other questions, feel free to contact us.

Post Reply