EhLib.Com
https://forum.ehlib.com/en/

Grouping data with DataGrouping option
https://forum.ehlib.com/en/viewtopic.php?f=5&t=821
Page 1 of 1

Author:  alberto.bonardi0001 [ 29 May 2018, 10:03 ]
Post subject:  Grouping data with DataGrouping option

Hello,
could someone explain me how to add the grouping functionality to my DBGridEh ?
I haven't found documentation in the online Help.
Have you some example ?

Thank you !

Best regard
Alberto

Author:  EhLibSupport [ 29 May 2018, 11:20 ]
Post subject:  Re: Grouping data with DataGrouping option

Hello

Read "Working with data in grouping mode" section in "EhLib Users Guide.doc"
The file is located in <ehlib archive>\Hlp\ENG\ folder.

------ "Working with data in grouping mode"
...
Set Grid.DataGrouping.Active to True to activate the grouping. Set GroupPanelVisible property to True to show the current active structure of the grouping.
...
------

Author:  rubemrocha [ 14 Aug 2020, 18:16 ]
Post subject:  Re: Grouping data with DataGrouping option

I have the following settings for a form:

TDBGrid -> TDataSource -> TMemTableEh -> TDataSetDriverEh -> TClientDataSet

I have the following issues:

1. I can't drag a column to the groupPanel;
2. I can't sort a grid clicking a column title.

What I'm doing wrong?

Author:  EhLibSupport [ 17 Aug 2020, 21:53 ]
Post subject:  Re: Grouping data with DataGrouping option

Hello

Quote:
1. I can't drag a column to the groupPanel;
Check if dghColumnMove is set in OptionsEh.

Quote:
2. I can't sort a grid clicking a column title.
Check that the following settings have been made.

Adjusting grid for sorting data:
TDBGridEh allows showing special sortmarking bitmaps (small triangles) in the right part of title cell. In order to automatically mark the title by sortmarking bitmaps you have to add dghAutoSortMarking to OptionsEh property. Add dghMultiSortMarking to OptionsEh in order to allow sortmarking in several columns simultaneously. Set Column.Title.TitleButton to true value for titles which will have possibility to change sortmarkers at run time. Or you can set ColumnDefValues.Title.TitleButton to allow setting sortmarking for all columns where Column.Title.TitleButton is not changed. At runtime, clicking on title will change sortmarking. Holding Ctrl key allows to mark several columns simultaneously. After user changes sormarking grid will call OnSortMarkingChanged event or will pass action to special object, if it is registered. Special object will use Grid.SortLocal property to determine how to sort data: locally or on the server. If you write OnSortMarkingChanged, you can use TDBGrid.SortMarkedColumns property to access the sortmarked columns and TColumnEh.Title.SortMarker property to get state of the sortmarker.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/