-【复杂标题】
TDBGridEh 允许在多列上创建标题,设置 DBGridEh.UseMultiTitle 属性为 True 并且填充字段的标签或列标题的标题,可以使用下面的规则:字段标签中的文本部分或列标题必须由几部分组成,并且用 "|" 分割,几个列的每一个通用部分都设置为相同。其它字段或标题必须在相应的部分包含同样的文本。
例如:
Field1.DisplayLabel := 'Title1|SubTitle1';
Field2.DisplayLabel := 'Title1|SubTitle2';
或
DBGridEh.Columns[0].Title.Caption := 'Title1|SubTitle1';
DBGridEh.Columns[1].Title.Caption := 'Title1|SubTitle2';
-【按钮式标题】
设置Column.Title.TitleButton 为 True可以强制标题单元为按钮式。写 OnTitleBtnClick事件来控制用户单击标题单元时的操作。
-【在标题中显示位图】
To show bitmap in titles instead of caption use TitleImages property of TDBGridEh and ImageIndex property of TColumnTitleEh.
-【自动用位置标识排序标题】.
TDBGridEh allows to show special sortmarking bitmaps (small triangles) in the right part of title cell. In order to automatically marking title by sortmarking bitmaps add dghAutoSortMarking to OptionsEh property. Add dghMultiSortMarking too in order to allow sortmarking several columns simultaneously. Set Column.Title.TitleButton to true for titles which will have possibility to change sortmarkers at run time. At runtime clicking on title will change sortmarking. Holding Ctrl key allows to mark several columns simultaneously. After user change sormarking grid call OnSortMarkingChanged event. You can write this event to change sorting and reopen in dataset. Use SortMarkedColumns property to access to sortmarked columns.
-【标题属性的默认值】
使用TDBGridEh.ColumnDefValues.Title来设置标题属性的默认值。
(出处:DelphiFans.com)