整体描述:

DBGridEh拥有DBGrid的所有功能,并有如下改进:

1、允许选择记录、列、方形区域;

2、多列合一的表头;

3、页脚能够显示求和,计数其他字段值;

4、自动调整列宽;

5、能够改变行和标题的宽度;

6、Allows automatic broken of a single line long title and datarow to a multiline.标题栏的自动折行?

7、标题能够以按钮形式显示,并任意排序;

8、自动排序;

9、能够用省略号的形式切断长文本;

10、Lookup字段的list可以显示多个字段的值;

11、Lookup字段可增加。(理解:可以输入自动添加到代码表中)

12、冻结某列;

13、对TDateField和TDateTimefield字段的DateTiemPkcker控件的支持;

14、根据字段的值显示TimageList里的图片;

15、允许隐藏或显示水平垂直的滚动条;

16、允许隐藏某列;

17、冻结、页脚、数据行的3D风格显示;

18、允许绘制Memo字段;

19、 Multiline inplace editor.

20、Proportional scrolling independently of sequenced of dataset.

21、   Automatically show checkboxes for Boolean fields. Allows to show checkboxes for other type of fields.

22、   Has a procedures to save and restore layout (visible columns, columns order, columns width, sortmarkers, row height) in/from registry or ini file.

23、   Allows to show bitmap in titles instead of caption.

24、   Allows to forbid/allow keys to insert, append, delete, update records.

25、   Allows to export data to Text, Csv, HTML, RTF, XLS and internal formats.

26、   Allows to import data from Text and internal formats.

27、   Can sort data in various dataset's.

28、   Can filter data in various dataset's.

使用方法(个人):

来自其他人:

1、DBGrideh最低下加上总计的栏

DBGridEh.FooterRowCount := 1;

DBGridEh.FooterColor := clYellow;

DBGridEh.SumList.Active := True;

DBGridEh.Columns[0].Footer.ValueType := fvtStaticText;

DBGridEh.Columns[0].Footer.Value := '总计:';

DBGridEh.Columns[1].Footer.ValueType := fvtCount; //fvtSum

2、DBGrid的属性

  FooterRowCount:底部的行数

  FooterColor、FooterFont :这两个一看就知啦。

还要双击DBGrid,加入字段,在IDE有会看到Footer属性,它有一个子属性FieldName

3、将网格的FootRowCount设为1,SumList.Active:=True;

   双击网格,点中你要求和的字段,按F11,点Foots属性的编辑器,

   Add一个,将它的ValueType设为fvtSum,FieldName设为你要求和的字段就可以啦!

4、DBGridEh里用户正在某格输入文本时,是不能直接获得当前输入的字符串的。因为

DBGridEh这时在这一格里放置了一个类似TEdit的编辑器,叫InplaceEditor。当前用户

输入时DBGridEh并不知道用户输入了什么字符串,直到焦点移到它处时,InplaceEditor

才将字符串提交给DBGridEh。因此,你要控制用户的当前输入只能通过DBGridEh.InplaceEditor来处理

5、显示多行TiTle(每列有两个标题,但不是合并两列):

 将DBGrid的UserMultiTitle设为True,将Column的Caption设为

例如:

Field1.DisplayLabel := 'Title1|SubTitle1';

Field2.DisplayLabel := 'Title1|SubTitle2';

DBGridEh.Columns[0].Title.Caption := 'Title1|SubTitle1';

DBGridEh.Columns[1].Title.Caption := 'Title1|SubTitle2';

posted on 2008-11-12 00:59  漂流侠  阅读(622)  评论(0编辑  收藏  举报