捐赠 | 广告 | 注册 | 发布 | 上传 | 关于我们    
  沪ICP备05001939号 DELPHI盒子 | 盒子论坛 | 盒子文章 | 盒子问答悬赏 | 最新更新 | 论坛检索 | 下载中心 | 高级搜索    
  精品专区 | 繁體中文 | 奖励公告栏 | 直通车账号登陆 | 关闭GOOGLE广告 | 临时留言    
 
广告
评论:给Ehlib中的DBGridEH增加自动过滤功能
jlwen 45768 2013/4/11 22:06:05
在实际运行中,run 并 stopFilter 一次后,再次 run ,在调整列宽或移动列顺序的时候,软件会异常退出。经测试,更改一下下面的代码,可以去除此错误:
将这里的代码:
procedure TFilterList.RestoreEvent;
begin
  try //grid column move
    if assigned(FGridColumnMoved) then //还原
      Grid.OnColumnMoved := FGridColumnMoved;
  except
    on E: exception do
    begin
      ShowMessage(e.Message);
    end;
  end;

  try //grid width
    if assigned(FGridColWidthsChanged) then //还原
      Grid.OnColWidthsChanged := FGridColWidthsChanged;
  except
    on E: exception do
    begin
      ShowMessage(e.Message);
    end;
  end;

改成:
procedure TFilterList.RestoreEvent;
begin
  try //grid column move
    if assigned(FGridColumnMoved) then //还原
      Grid.OnColumnMoved := FGridColumnMoved
    else          ///----------添加这两行
      Grid.OnColumnMoved := nil;
  except
    on E: exception do
    begin
      ShowMessage(e.Message);
    end;
  end;

  try //grid width
    if assigned(FGridColWidthsChanged) then //还原
      Grid.OnColWidthsChanged := FGridColWidthsChanged
    else          ///----------添加这两行
      Grid.OnColWidthsChanged := nil;
  except
    on E: exception do
    begin
      ShowMessage(e.Message);
    end;
  end;

即可。
PatchHome 40798 2010/7/27 11:18:06
solarmoon你好,DBGrideh如果开启dghShowRecNo后,过滤后的记录会把显示的记录号不显示了,有什么方法解决吗?另外什么时候来个升级版,能自行设置哪几项进行过滤。呵呵。
ship0217 38439 2009/8/22 18:54:00
[Error]Never-build pachage ‘TFilterList’ requires always-build pachage ‘EhLib70’
solarmoon 36618 2009/1/7 13:37:01
之前已回复过了:
最近改为用delphi2007+ehlib4.2, 也发现这个问题,解决的办法是打开Frm_FilterList.pas 文件,找到第240行,将语句:
if dgIndicator in Grid.Options then 改为
if DBGridEh.dgIndicator in Grid.Options then
即可,  出错的原因是在delphi2007中将 dgIndicator 识别成 DBGrids.TDBGridOpton的成员.
45544502 36238 2008/11/26 10:54:02
[Hint] Frm_FilterList.pas(166): Value assigned to 'nModal' never used
[Error] Frm_FilterList.pas(240): Incompatible types: 'DBGrids.TDBGridOption' and 'DBGridEh.TDBGridOption'
[Error] Frm_FilterList.pas(392): Incompatible types: 'DBGrids.TDBGridOption' and 'DBGridEh.TDBGridOption'
[Error] Frm_FilterList.pas(525): Incompatible types: 'DBGrids.TDBGridOption' and 'DBGridEh.TDBGridOption'
[Warning] Frm_FilterList.pas(1205): Unsafe type 'TBookmark'
[Warning] Frm_FilterList.pas(1223): Unsafe code '@ operator'
[Warning] Frm_FilterList.pas(1229): Unsafe type 'SavePlace: Pointer'
[Warning] Frm_FilterList.pas(1276): Unsafe type 'SavePlace: Pointer'
[Warning] Frm_FilterList.pas(1277): Unsafe type 'SavePlace: Pointer'
[Hint] Frm_FilterList.pas(41): Private symbol 'FMemo' declared but never used
[Hint] Frm_FilterList.pas(55): Private symbol 'NewAfterOpen' declared but never used
[Hint] Frm_FilterList.pas(56): Private symbol 'SetStrField' declared but never used
[Hint] Frm_FilterList.pas(61): Private symbol 'SetAutoStart' declared but never used
[Hint] Frm_FilterList.pas(129): Private symbol 'FbMouseCapture' declared but never used
[Hint] Frm_FilterList.pas(131): Private symbol 'IsInRect' declared but never used
[Fatal Error] TFilterList.dpk(41): Could not compile used unit 'Frm_FilterList.pas'

delphi 7中不能安装啊,要怎么弄?
wuchanjieji 35598 2008/9/30 21:02:12
[Error] Frm_FilterList.pas(240): Incompatible types: 'DBGrids.TDBGridOption' and 'DBGridEh.TDBGridOption'
[Error] Frm_FilterList.pas(392): Incompatible types: 'DBGrids.TDBGridOption' and 'DBGridEh.TDBGridOption'
[Error] Frm_FilterList.pas(525): Incompatible types: 'DBGrids.TDBGridOption' and 'DBGridEh.TDBGridOption'
delphi 7中不能安装啊
sumig 35312 2008/8/19 10:23:00
编译包时出现“[Error]Never-build pachage ‘TFilterList’ requires always-build pachage ‘EhLib70’”。請問是什麼問題啊!
sumig 35311 2008/8/19 9:45:51
我用的是Delphi7+Ehlib4.2.6但安装不上呀?
sxghlxg 35296 2008/8/16 9:32:29
已经安装了FlatStyle v4.42.9.0 For D7 再安装此Package报错,已经解决OK
sxghlxg 35295 2008/8/16 7:41:16
已经安装了FlatStyle v4.42.9.0 For D7 再安装此Package报错,说已经安装了FlatStyle。。。我的程序已经用了FlatStyle,怎么修改?
solarmoon 35260 2008/8/12 9:18:18
to adg14325

我按你说的在adoquery 的afteropen中加入filterlist.run, 没有出错啊?!
另外我在运行时将adoquery.active设为true 或 false 也没有出现错误,

你可能需要将出错的具体情况写出来,
谢谢
adg14325 34128 2008/5/18 8:40:14
为什么我把adoquery关闭了,再重新打开就报错,是不是我放的位置不对啊,我是想一运行就出现过滤的按钮,我是放在adoquery的afteropen事件里的,
happyhong 34067 2008/5/11 10:28:20
OK了,你发布的包在EHLIB110下,还是不行,我新建了一个包,重新引入所需的单元等文件就行了
happyhong 34066 2008/5/11 9:50:35
solarmoon :
很好好强大,回头试试,还有,DBGRIDEH的自打的打印控件,有时在放大或缩小报表时,或联共享打印机打印时,经常打出来的报表会缩放到很小。
你知道是怎么回事吗
solarmoon 34047 2008/5/9 14:37:33
回复yeshope

为什么会装不上?有什么问题或是出错的信息?
solarmoon 34046 2008/5/9 14:36:18
回复happylong:
我最近改为用delphi2007+ehlib4.2, 也发现这个问题,解决的办法是打开Frm_FilterList.pas 文件,找到第240行,将语句:
if dgIndicator in Grid.Options then 改为
if DBGridEh.dgIndicator in Grid.Options then
即可,  出错的原因是在delphi2007中将 dgIndicator 识别成 DBGrids.TDBGridOpton的成员.

不好意思
yeshope 34031 2008/5/8 10:33:09
我用的是Delphi7+Ehlib4.2.6但安装不上呀?怎么解决?
happyhong 33756 2008/4/21 0:32:48
我的环境是DELPHI2007+EHLIB4.2.16的,把EHLIB70也改为了EHLIB110,但还是出现这样的错误:
[DCC Error] Frm_FilterList.pas(240): E2010 Incompatible types: 'DBGrids.TDBGridOption' and 'DBGridEh.TDBGridOption'
solarmoon 32724 2008/1/16 9:04:58
D7我没有用过, 如果是rtl not found, 在D6中rtl.dcp是在delphi6\lib目录下
solarmoon 32722 2008/1/16 8:57:58
Delphi2007+Ehlib4.2.6也可, 但需要将Package 中引用的Ehlib70改为Ehlib110
第一页 上一页 下一页 最后页 有 25 条纪录 共2页 1 - 20
 用户名:
 密 码:
自动登陆(30天有效)
 
  DELPHI盒子版权所有 1999-2023 V4.01 粤ICP备10103342号-1 更新RSS列表