https://blog.csdn.net/zengcong2013/article/details/43118189

 In addition to this method, 
you can use the following controller methods to switch the visibility of the Find Panel and customize its search string:
ClearFindFilterText, GetFindFilterText, ShowFindPanel, HideFindPanel, and IsFindPanelVisible.

清空搜索内容

cxGridDBTV.DataController.ClearFindFilterText;

用代码执行findpanle的功能(默认的findpanle太占地方了,可以自己新建一个edit1,放到cxgrid的水平滚动条,可以启用数据导航功能,默认有属性设置间距的)

var
AFindPanel: TcxGridFindPanel;
begin
AFindPanel := TcxGridFindPanel.Create(<AcxGridDBTableView>.Controller);
<AcxGridDBTableView>.Controller.ApplyFindFilterText(<your text>);
end;

判断是否聚焦

type
TcxGridTableControllerAccess = class(TcxGridTableController);
procedure TForm1.Timer1Timer(Sender: TObject);
var
AEdit: TcxGridFindPanelMRUEdit;
begin
AEdit := TcxGridTableControllerAccess(cxGrid1DBTableView1.Controller).FindPanel.Edit;
if (AEdit <> nil) and AEdit.Focused then
Caption := '+'
else
Caption := '-';
end;

禁用最近访问历史记录

type
TcxGridTableControllerAccess = class(TcxGridTableController); procedure TForm1.FormCreate(Sender: TObject);
begin
TcxGridTableControllerAccess(cxGrid1DBTableView1.Controller).FindPanel.Edit.Properties.ImmediateDropDownWhenKeyPressed := False;
TcxGridTableControllerAccess(cxGrid1DBTableView1.Controller).FindPanel.Edit.Properties.Buttons[].Visible := False;
end;

启用扩展语法

<AcxGridDBTableView>.FindPanel.UseExtendedSyntax := True; //enable this option

扩展语法的使用规则

Additional information:

Use the new Options.UseExtendedSyntax property to enable the extended syntax for Find Panel search strings, allowing end-users to apply multiple conditions. According to the extended syntax, words separated by the space character are treated as individual conditions combined by the OR logical operator. The grid shows records that match at least one of these conditions. The extended syntax includes support for the following specifiers and wildcards:
- The "+" specifier. Preceding a condition with this specifier causes the grid to display only records that match this condition. The "+" specifier implements the logical AND operator. There should be no space character between the "+" sign and the condition.
- The "–" specifier. Preceding a condition with "–" excludes records that match this condition from search results. There should be no space between the "–" sign and the condition.
- The percent ("%") wildcard. This wildcard substitutes any number of characters in a condition.
- The underscore ("_") wildcard. This wildcard represents any single character in a condition. For more information about the extended syntax, refer to the corresponding section in the "Find Panel" help topic.

翻译按钮中文

dxCore, cxGridStrs;

initialization
cxSetResourceString(@scxGridFindPanelClearButtonCaption, '清空');
cxSetResourceString(@scxGridFindPanelFindButtonCaption , '搜索');

findpanel 的相关代码的更多相关文章

  1. [ARM] Cortex-M Startup.s启动文件相关代码解释

    1. 定义一个段名为CSTACK, 这里: NOROOT表示如何定义的段没有被关联,那么同意会被优化掉,如果不想被优化掉就使用ROOT. 后面的括号里数字表示如下: (1):这个段是2的1次方即2字节 ...

  2. Kafka Producer相关代码分析【转】

    来源:https://www.zybuluo.com/jewes/note/63925 @jewes 2015-01-17 20:36 字数 1967 阅读 1093 Kafka Producer相关 ...

  3. 命令行方式使用abator.jar生成ibatis相关代码和sql语句xml文件

    最近接手一个老项目,使用的是数据库是sql server 2008,框架是springmvc + spring + ibatis,老项目是使用abator插件生成的相关代码,现在需要增加新功能,要添加 ...

  4. myBatis自动生成相关代码文件配置(Maven)

    pom.xml文件添加配置 <build> <finalName>generator</finalName> <plugins> <!-- mav ...

  5. 临时2级页表的初始化过程 head_32.S 相关代码解释

    page_pde_offset = (__PAGE_OFFSET >> 20); /* __PAGE_OFFSET是0xc0000000,page_pde_offset = 3072 = ...

  6. 使用Mybatis Generator自动生成Mybatis相关代码

    本文将简要介绍怎样利用Mybatis Generator自动生成Mybatis的相关代码: 一.构建一个环境: 1. 首先创建一个表: CREATE TABLE pet (name VARCHAR(2 ...

  7. K:树、二叉树与森林之间的转换及其相关代码实现

    相关介绍:  二叉树是树的一种特殊形态,在二叉树中一个节点至多有左.右两个子节点,而在树中一个节点可以包含任意数目的子节点,对于森林,其是多棵树所组成的一个整体,树与树之间彼此相互独立,互不干扰,但其 ...

  8. js 横屏 竖屏 相关代码 与知识点

    <!DOCTYPE html> <html> <head> <title></title> </head> <body&g ...

  9. 转:关于Latent Dirichlet Allocation及Hierarchical LDA模型的必读文章和相关代码

    关于Latent Dirichlet Allocation及Hierarchical LDA模型的必读文章和相关代码 转: http://andyliuxs.iteye.com/blog/105174 ...

随机推荐

  1. PLSQL连接Oracle 数据库配置详解

    1. 下载instantclient-basic-win32-11.2.0.1.0 (oracle官网下载地址:http://www.oracle.com/technetwork/topics/win ...

  2. selenium+python自动化80-文件下载(不弹询问框)

    前言 上一篇是点弹出框上的按钮去保存文件,本篇介绍一种更加优雅的方法,加载Firefox和Chrome的配置文件,不弹出询问框后台下载. 一.FirefoxProfile 1.点下载的时候,如下图,如 ...

  3. SQL SERVER 2005 数据库置疑修复

    alter database 置疑数据库 set emergency go alter database 置疑数据库 set single_user with rollback immediate g ...

  4. 浅谈压缩感知(二十四):压缩感知重构算法之子空间追踪(SP)

    主要内容: SP的算法流程 SP的MATLAB实现 一维信号的实验与结果 测量数M与重构成功概率关系的实验与结果 SP与CoSaMP的性能比较 一.SP的算法流程 压缩采样匹配追踪(CoSaMP)与子 ...

  5. VMware: Non-VI workload detected on the datastore

    check ref: Unmanaged I/O workload detected on shared datastore running Storage I/O Control (SIOC) fo ...

  6. phpBB3.2开发环境配置

    从Github导出项目 如果只是查看代码, 可以直接clone官方的git https://github.com/phpbb/phpbb.git . 如果需要开发, 就fork一下再从自己的Git里c ...

  7. 更新ruby:Error running 'requirements_osx_brew_update_system ruby-2.4.1报错解决

    更新ruby时,报错: Failed to update Homebrew, follow instructions here: https://github.com/Homebrew/homebre ...

  8. Python多进程库multiprocessing中进程池Pool类的使用[转]

    from:http://blog.csdn.net/jinping_shi/article/details/52433867 Python多进程库multiprocessing中进程池Pool类的使用 ...

  9. SNFAutoupdater通用自动升级组件V2.0

    1.组件介绍 C/S构的特点是能充分发挥客户端的处理能力,很多工作可以由客户端处理后再提交给服务器,对应的优点就是客户端响应速度快模式客户端以其强大的功能,丰富的表现力受到相当大部分用户的青睐,但是客 ...

  10. Nginx负载均衡权重,ip_hash

    nginx为后端web服务器(apache,nginx,tomcat,weblogic)等做反向代理 几台后端web服务器需要考虑文件共享,数据库共享,session共享问题.文件共享可以使用nfs, ...