Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 1788

Summary: Duplicates in Grid
Product: TeeGrid for Delphi Reporter: Roland Kossow <roland.kossow>
Component: GridAssignee: david berneda <david>
Status: RESOLVED FIXED    
Severity: enhancement CC: roland.kossow
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:
Attachments: Screencast of issue

Description Roland Kossow 2017-02-15 16:59:40 EST
I have a situation where duplicate records are shown.
Is there anything which I could do wrong that might be causeing this - or is this a bug? (see attached screencast)
Comment 1 Roland Kossow 2017-02-15 17:00:12 EST
Created attachment 712 [details]
Screencast of issue
Comment 2 Roland Kossow 2017-02-15 17:13:55 EST
I figured out how to workaround this issue. And again - I am not certain if this is a problem with the grid or with the AureliusDataset with which I use it.

This behaviour happens when the grid is associated with a detailgrid of a master detail dataset setup.

If I close the detaildataset in the before scroll event of the masterdataset and reopen the detailgrid in the after scroll event of the masterdataset the grid does not show duplicates.

I would prefer not to have to do this closing and opening in the events and still have the grid not show duplicates. Other grids do not have this problem with aurelius dataset.
Comment 3 david berneda 2017-02-16 04:38:05 EST
Strange, this is maybe due to the combination of using Aurelius.
I'm creating a new simple demo with two grids, and two datasets for master-detail, to check for this problem
Comment 4 Roland Kossow 2017-02-16 10:45:41 EST
If you try to create a demo I suggest you do the demo with one master dataset and two detail datasets. That is the situation where the problem occurs in my case. If only one detaildataset is used everything works fine.
Comment 5 david berneda 2017-02-16 12:39:10 EST
About duplicated records, I think I've found the problem.

For example with FireDAC datasets, the property:

  XXDataSet1.FetchOptions.RecordCountMode

should be set to "cmTotal".

The default recordcount mode is "visible only", which means the dataset is not returning the correct total number of records.

TeeGrid (as it is now), needs to know the total number of records (like FMX Grid does).

Plans for next release is to implement an "agnostic" mode that does not need to know the real recordcount (as VCL DBGrid does).
Comment 6 david berneda 2017-02-21 06:06:56 EST
This issue (duplicate rows) should be resolved in the latest "nightly build" available here:

http://www.steebi.com/files/code/beta/vcl_fmx/teegrid/

The reason of duplicate rows is more complex, related to "buffered dataset" missing feature:

http://bugs.teechart.net/show_bug.cgi?id=1773