I am using Delphi and DevExpress component TdxDBgrid as Grid, TdxMemData as dataset. I am trying to group the records which having same column value 'Master' under one row and on expanding that Master row we can see child rows in the grid. I am trying to find example for this but not able to get any. Does any one know any example or does anyone did same kind of group rows in Grid. Suggestions are welcome. Thanks in advance for help.

有帮助吗?

解决方案

Set the ShowGroupPanel property of the grid to True. Then, drag a column header of the grid onto the group panel (displayed above the column headers) to group by that column. You can group by columns in code, too, by doing something like

dxDGrid1Column1.GroupIndex := 0; 
dxDGrid1Column2.GroupIndex := 1; 

ISTR this is explained in the OLH and illustrated in the examples.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top