dbgrideh的功能
a.点标题排序:
1.eh的optionsEh 的dghAutoSortMarking True
2 eh的sortlocal true
3.列的title的toolbutton为true
4。eh的optionsEh 的dghMultiSortMarking True 多个字段一起排(按CTRL+Mouse)
5.uses加相应的驱动ehlibado/ehlibbde
b.模糊过滤:
uses ehlibado;
if Assigned(DataSource) and Assigned(DataSource.DataSet) then
DataSource.DataSet.Filtered :=true;
STFilter.Local :=True;
STFilter.Visible :=True;
//加过滤下拉列表
for i:=0 to Columns.Count-1 do
Columns[i].STFilter.ListSource :=DataSource;
//加排序列表菜单
列的dropdownSizing
c.斑马线
if Assigned(DataSource) and Assigned(DataSource.DataSet) then
begin
if DataSource.DataSet.IsSequenced then
begin
OddRowColor :=clRed;
EvenRowColor:=clYellow;
end
else begin
aDBGridEH.OnDrawColumnCel//处理
end;
end;
end;
procedure DBGridEhDrawColumnCell(Self: TObject;Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumnEh;
State: TGridDrawState);
begin
if (gdSelected in State) then
begin
end
else if (Rect.Top = (Sender as TDBGridEh).CellRect((Sender as TDBGridEh).Col,(Sender as TDBGridEh).Row).Top) and (not (gdFocused in State) or not (Sender as TDBGridEh).Focused) then
begin
(Sender as TDBGridEh).Canvas.Brush.Color := clblack;//选择行
(Sender as TDBGridEh).Canvas.Font.Color := clWhite;
end
else
begin
(Sender as TDBGridEh).Canvas.Brush.Color := clYellow;//奇行
(Sender as TDBGridEh).Canvas.Font.Color := clWindowText;
end;
if (not (gdSelected in State)) and ((((Sender as TDBGridEh).DataSource.DataSet.RecNo) mod 2) =0) then
begin
(Sender as TDBGridEh).Canvas.Brush.Color := clred;//偶行
(Sender as TDBGridEh).Canvas.Font.Color := clWindowText;
end;
// (Sender as TDBGridEh).Canvas.FillRect(Rect);
(Sender as TDBGridEh).DefaultDrawColumnCell(Rect,DataCol,Column,State);
end;
d.统计栏
e.保存grid位置
SaveGridLayoutIni(IniFileName,GetFullName(TWinControl(Sender)),true);
RestoreGridLayoutIni(IniFileName,vSectionName,[grpColIndexEh, grpColWidthsEh, grpSortMarkerEh, grpColVisibleEh,grpDropDownRowsEh,grpDropDownWidthEh]);
转载于:https://www.cnblogs.com/jiangyuxuan/archive/2008/09/05/1285035.html
dbgrideh的功能相关推荐
- ehlib的DBGridEh控件中使用过滤功能的方法
关于在ehlib的DBGridEh控件中使用过滤功能的方法 在ehlib的DBGridEh控件中使用过滤功能很方便,但使用过程中有几个容易被忽略的地方,它曾经困绕了我很长时间,过滤功能就是用不起来. ...
- DBGRIDEH 组件在Borland开发工具中应用全攻略
DBGRIDEH 组件在Borland开发工具中应用全攻略 2003-08-05 16:36:18 陈文彬 DBGRIDEH 是Enlib 3.0组件包中的组件之一.E ...
- DBGridEh使用技巧
首先将dbgrideh的一个页脚数属性FooterRowCount设置为 1; 再将dbgrideh的属性中的sumlist中的Active 设置为 True; 第三步:打开dbgrideh的字段列表 ...
- DBGRIDEH 组件,速达2000中应用了该组件
DBGRIDEH 是Enlib 3.0组件包中的组件之一.Enlib 3.0组件包是一位俄国人为增强Borland系列开发工具功能而开发的第三方组件,它具有界面友好.功能强大.开发效率高..快速制作预 ...
- clientdataset 遍历字段_解决DBGridEh遍历记录后不移动当前行位置的方法
解决DBGridEh遍历记录后不移动当前行位置的方法 在用DBGridEh配合ClientDataSet使用时,需要知道用户选择了哪些记录,可用遍历记录的方法查询选择列是否为真,但在这之后,Clien ...
- DBGrid和DBGridEH
二.应用实例Enlib3.0组件包安装成功后 A.定制标题行1.制作复杂标题行标题行可设为2行以上高度,并可以为多列创建一个共同的父标题行.为实现这个效果,需在各个列标题属性中以"|&quo ...
- 如果你没用过maven的install,你应该了解一下!maven中的install功能及用法。
maven中有一个大多数人都忽视或者没有用到过的一个功能--install,大多数java开发人员都了解maven,使用maven进行依赖管理.但使用的大多数功能不过是clean清理.compile编 ...
- 一个form表单,多个提交按钮(实现不同功能和地址的提交)
直接上代码 表单部分: <form action="" name="find" method="post" enctype=" ...
- nginx介绍及常用功能
什么是nginx nginx跟Apache一样,是一个web服务器(网站服务器),通过HTTP协议提供各种网络服务. Apache:重量级的,不支持高并发的服务器.在Apache上运行数以万计的并发访 ...
最新文章
- linux查看msf安装目录,linux系统安装msf的过程详解
- U盘制做DOS启动盘
- cnil在python_在Python中使用cumprod()计算权益曲线
- 90后中国程序员“黑吃黑”博彩网站,半年获利256万,判刑11年半
- 2020年产品经理生存报告
- 【华为大咖分享】8.Focus on Value 的思考与实践精粹(后附PPT下载地址)
- Leetcode 814.二叉树剪枝
- hive不在同一台机 hue_【Impala篇】---Hue从初始到安装应用
- 基于 USB 传输的针式打印机驱动程序开发
- Java常见异常和解决办法
- 最大子段和C语言实现
- iOS:项目中无用类检测和无用图片检测汇总
- 服务器DDoS攻击有几种类型?
- 《Adobe Photoshop CS4中文版经典教程》目录—导读
- Day530.图灵学院之面试题④ -面经
- 大牛博士是如何进行文献检索和阅读的
- JVM、JDK、JER介绍
- 奥比中光相机的python采集代码
- 初级web开发菜鸟的电脑软件备份【2020-3-23】
- Javascript与其他语言的区别
热门文章
- 机器学习--机器学习的分类
- 使用jquery插件报错:TypeError:$.browser is undefined的解决方法
- Linux(CentOS6.4)下简单部署Solr4.8.1
- (原创)eCos驱动分析 之 ISR是如何与硬件中断联系起来的?
- python——opencv入门(一)
- PyCaret 2.0在这里-新增功能?
- 外部 Storage Provider - 每天5分钟玩转 Docker 容器技术(149)
- 被冻结的钱,银行可以私自处理吗?
- 胡玥的侦探小说《做局》及自传《时间之夜》
- 万维网服务器协议提供web,万维网的HTTP和FTP协议.doc