EhLib.Com https://forum.ehlib.com/en/ |
|
DBGrid-DataGrouping: Get amount of Nodes https://forum.ehlib.com/en/viewtopic.php?f=5&t=1071 |
Page 1 of 1 |
Author: | innovateAdmin [ 15 Feb 2021, 14:21 ] | ||
Post subject: | DBGrid-DataGrouping: Get amount of Nodes | ||
Hi, I am new to the forum and have a question: In a DBGridEh with DataGrouping.Active = True and GroupLevel[0] = ColumnName I want to know how many different "Nodes" are in the table. For further information please look to the file. Thanks for your help!
|
Author: | EhLibSupport [ 17 Feb 2021, 04:07 ] |
Post subject: | Re: DBGrid-DataGrouping: Get amount of Nodes |
Hello You can use DBGridEh.DataGrouping.GroupDataTree property to access Grouping Tree. And use next code to get number of records in the top-level groupings Code: procedure TfrDataGrouping.Button1Click(Sender: TObject);
begin ShowMessage('The number of records in the top-level groupings - ' + DBGridEh1.DataGrouping.GroupDataTree.Root.Count.ToString); end; |
Author: | innovateAdmin [ 17 Feb 2021, 08:13 ] |
Post subject: | Re: DBGrid-DataGrouping: Get amount of Nodes |
Thanks for your support. This is not working for me, the result of DBGridEh1.DataGrouping.GroupDataTree.Root.Count is 0. Maybe, something is wrong in my project? In DBGridEh DataGrouping active is true, there is one grouplevel DBGridEh1.DataGrouping['ArtNr'] with the columnname Column_5_ArtNr. Is there something to configure in the MemTable? Gerd |
Author: | EhLibSupport [ 17 Feb 2021, 08:41 ] | ||
Post subject: | Re: DBGrid-DataGrouping: Get amount of Nodes | ||
Hello Try to test in project MainDemo, frame - FrameDataGrouping.
|
Author: | innovateAdmin [ 17 Feb 2021, 13:04 ] |
Post subject: | Re: DBGrid-DataGrouping: Get amount of Nodes |
Hm, I am on 10.0.30 and it's 0 Attachment: GroupDataTree.Root.Count.PNG [ 63.39 KiB | Viewed 1313 times ] Same result on 10.0.31 (just updated). Any idea? |
Author: | EhLibSupport [ 17 Feb 2021, 21:06 ] |
Post subject: | Re: DBGrid-DataGrouping: Get amount of Nodes |
Hello Make sure you are accessing the correct DBGirdEh with Grouping. Judging by the screenshot, you have placed the button on the Form1 form where DBGridEh1 is a grid with a list of Demo frames. Place the button on TfrDataGrouping (unit FrameDataGrouping). |
Author: | innovateAdmin [ 18 Feb 2021, 07:50 ] |
Post subject: | Re: DBGrid-DataGrouping: Get amount of Nodes |
my mistake ... Now I have to find the difference between my project and datagrouping in the demo. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |