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. C#编程(八十)---------- 异常类

    异常类 在C#里,异常处理就是C#为处理错误情况提供的一种机制.它为每种错误情况提供了定制的处理方式,并且把标志错误的代码预处理错误的代码分离开来. 对.net类来说,一般的异常类System.Exc ...

  2. error LNK1104:无法打开文件"lua51.lib"

    今天学习C++与Lua通信,遇到了问题:fatal error LNK1104: 无法打开文件“lua51.lib” 开发环境: VS2012 cocos版本:cocos2d-x-3.0 已经按书&l ...

  3. [Android Pro] https://blog.csdn.net/gaugamela/article/details/79143309

    原文地址:https://blog.csdn.net/gaugamela/article/details/79143309 最近遇到这样一个问题: 第三方的SDK除了Jar包外,还提供了对应的so文件 ...

  4. Linux系统管理员应该知道的journalctl知识

    在Systemd出现之前,Linux系统及各应用的日志都是分别管理的,Systemd开始统一管理了所有Unit的启动日志,这样带来的好处就是可以只用一个 journalctl命令,查看所有内核和应用的 ...

  5. ASP.NET Core -中间件(Middleware)使用

    ASP.NET Core开发,开发并使用中间件(Middleware). 中间件是被组装成一个应用程序管道来处理请求和响应的软件组件. 每个组件选择是否传递给管道中的下一个组件的请求,并能之前和下一组 ...

  6. UVA 12293 - Box Game(博弈)

    UVA 12293 - Box Game 题目链接 题意:两个盒子,一開始一个盒子有n个球.一个仅仅有1个球,每次把球少的盒子中球消掉,把多的拿一些球给这个盒子.最后不能操作的输(球不能少于1个),A ...

  7. hdu2255 奔小康赚大钱,最大权匹配,KM算法

    点击打开链接 最大权匹配 KM算法 算法步骤: 设顶点Xi的顶标为a[i],顶点Yi的顶标为b[i] ⅰ.初始时.a[i]为与Xi相关联的边的最大权值.b[j]=0.保证a[i]+b[j]>=w ...

  8. 手把手教你整合最优雅SSM框架:SpringMVC + Spring + MyBatis

    在写代码之前我们先了解一下这三个框架分别是干什么的? 相信大以前也看过不少这些概念,我这就用大白话来讲,如果之前有了解过可以跳过这一大段,直接看代码! SpringMVC:它用于web层,相当于con ...

  9. JavaBean之lombok

    参见:https://www.ibm.com/developerworks/cn/opensource/os-lombok/ http://blog.didispace.com/java-lombok ...

  10. 基于Docker的redis集群搭建

    Redis集群官方介绍:http://www.redis.cn/topics/cluster-tutorial.html 基于Docker搭建Redis集群 环境:6个节点,三主三从 制作Redis镜 ...