DBGridEh使用学习(1)

TDBGridEh

描述
TDBGridEh提供了TDBGrid的全部功能,并扩展了下面列出的新特性:
  #允许选择记录、列和矩形区域
  #可以与多个/全部列对应的特殊标题(titles)
  #用于显示sum/count/其它字段值的Footer
  #自动调整列宽使GRID的宽度与Client的宽度相同
  #改变行和标题的高度的能力
  #允许自动将含有长标题或数据的行分成多行
  #标题可以用来作为按钮并且可以设置出现一个排序标记
  #自动排序标记
  #将长文本用省略号显示
  #Lookup 列表显示多个字段
  #lookup字段支持增量搜索
  #固定列
  #DataTime picker用于日期型的字段
  #允许根据字段的值从ImageList中显示一个位图
  #允许隐藏横/纵的滚动条
  #允许隐藏列
  #允许为固定列、Footer和数据行显示3D框架
  #允许绘制Memo字段
  #多行的内置编辑器
  #按比例滚动DataSet序列
  #自动为boolean类型字段显示checkBox,允许为其他类型字段显示checkbox
  #提供将布局形式存储在注册表/INI文件中的方法
  #允许在标题中以位图取代文字
  #可以"禁止/允许"进行插入/删除/追加/修改记录
  #允许将数据导出为: Text,CSV,HTML,RTF,XLS和内部格式
  #允许从TEXT和内部格式中导入数据
  #可以对不同DATASET中的数据排序/过滤

复杂标题
    要创建对应多列的标题,字段的标题或GRID列的标题必须由多个由"|"分隔的部分构成,其中每个部分对于多个列是相同的.其他字段在对应部分必须包含相同的文本. 同时将DBGridEh.UseMultiTitle 属性设为True.
    例如:
    Field1.DisplayLabel := 'Title1|SubTitle1'; 或 DBGridEh.Columns[0].Title.Caption := 'Title1|SubTitle1';
    Field2.DisplayLabel := 'Title1|SubTitle2'; 或 DBGridEh.Columns[1].Title.Caption := 'Title1|SubTitle2';

Footer and total values.
   要显示FOOTER行需要设置FooterRowCount属性.
   要强制GRID计算汇总值,需要激活SumList (DBGridEh.SumList.Active := True).
   在Footer单元格中,可以显示某字段的合计值(记录条数/字段值/静态文本).使用Column.Footer.ValueType.
   如果ValueType = fvtStaticText, 则设置Value属性.
   如果ValueType = fvtFieldValue, 则设置FieldName属性.
   将ValueType设置为fvtSum,grid必须显示某列字段的合计值,也可以指定Column.Footer.FieldName来计算其他字段的合计值.
   如果有多于1个Footer,可以使用Column.Footers集合指定列中的每一个Footer.

The history of the EhLib library -------------------------------- Version 6.1 + A new component TDBVertGridEh - DataSet Grid with the Vertical Orientation. The component is used to display and edi t a single record of DataSet in a vertical orientation. Basic properties of the TDBVertGridEh: Rows: TDBVerGridRows - A collection of items of TFieldRowEh type to display fields of a record. This is analogous to the Columns collection in TDBGridEh. Options: TDBVHGridOptions - Configure basic properties of the vertical grid. RowsDefValues: TFieldRowDefValuesEh - default values for line Grid row - TFieldRowEh. This is analogous of ColumnDefValues in TDBGridEh. GridLineParams: TDBVertGridLineParamsEh - Color settings of the dividing lines in vertical grid. DataColParams: TDBVertGridDataColParamsEh - The setting of the column with data. LabelColParams: TDBVertGridLabelColParamEh - The setting of the column with row label. See an example of using TDBVertGridEh in a project: <EhLib Archive> \ Demos \ DBVertGridEh.SimpleDemo \ Project1.dpr compiled project: <EhLib Archive> \ Demos \ Bin \ DBVertGridEh.SimpleDemo.Exe * There are changes in the grids inheritance tree: New inheritance tree is: TCustomControl | - TCustomGridEh | - TCustomDBAxisGridEh | - TCustomDBGridEh | | | - TDBGridEh | - TCustomDBVertGridEh | - TDBVertGridEh * Some constants and procedures are moved from the module DBGridEh to the DBAxisGridsEh. + Added a new global function to display a ObjectInspector-like Form. Use the next procedure to display the ObjectInspector-like Form: procedure ShowObjectInspectorForm ( Component: TObject; // A component to Inspect FormBounds: TRect; // Form Borders NewForm: Boolean = False // Show as a new Form ); This is a simple ObjectInspector that can be used to debug property setting at run-time. See an example that shows how to use ShowObjectInspectorForm here: <EhLib Archive> \ Demos \ ObjectInspectorForm.SimpleDemo \ Project1.dpr compiled project: <EhLib Archive> \ Demos \ Bin \ ObjectInspectorForm.SimpleDemo.Exe In DBGridEh + Added an ability to change the size of RowDetailPanel by mouse at RunTime. New properties in RowDetailPanel: property VertSizing: Boolean - Show an RowDetailPanel Splitter at the buttom of the RowDetailPanel. property MinHeight: Integer - Minimum height of the RowDetailPanel. property MaxHeight: Integer - Maximum height of the RowDetailPanel. property SizingBarBeveled: Boolean - Splitter area has a 3D border. property SizingBarHeight: Integer - The height of the Splitter. + Added an ability to darken gray the grid while the data is loading. See StartLoadingStatus and FinishLoadingStatus methods in the TDBGridEh. See the example that shows this opportunity in a project: <EhLib Archive> \ Demos \ DBGridEh.LoadingStatus \ Project1.dpr compiled project: <EhLib Archive> \ Demos \ Bin \ DBGridEh.LoadingStatus.Exe
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值