有DBGridEh的源码就可以.
修改DBGridEh.pas
TCustomDBGridEh = class(..)
...
public
procedure OpenFindDlg;
//增加查找功能
...
end;
procedure TCustomDBGridEh.OpenFindDlg;
begin
if DataSource.DataSet.Active then
begin
Self.SetFocus;
ExecuteDBGridEhFindDialogProc(Self, '', '', nil, Self.IsFindDialogShowAsModal);
end;
end;
在你的程序中调用即可
DBGridEh1.OpenFindDlg;