findpanel 的相关代码
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 的相关代码的更多相关文章
- [ARM] Cortex-M Startup.s启动文件相关代码解释
1. 定义一个段名为CSTACK, 这里: NOROOT表示如何定义的段没有被关联,那么同意会被优化掉,如果不想被优化掉就使用ROOT. 后面的括号里数字表示如下: (1):这个段是2的1次方即2字节 ...
- Kafka Producer相关代码分析【转】
来源:https://www.zybuluo.com/jewes/note/63925 @jewes 2015-01-17 20:36 字数 1967 阅读 1093 Kafka Producer相关 ...
- 命令行方式使用abator.jar生成ibatis相关代码和sql语句xml文件
最近接手一个老项目,使用的是数据库是sql server 2008,框架是springmvc + spring + ibatis,老项目是使用abator插件生成的相关代码,现在需要增加新功能,要添加 ...
- myBatis自动生成相关代码文件配置(Maven)
pom.xml文件添加配置 <build> <finalName>generator</finalName> <plugins> <!-- mav ...
- 临时2级页表的初始化过程 head_32.S 相关代码解释
page_pde_offset = (__PAGE_OFFSET >> 20); /* __PAGE_OFFSET是0xc0000000,page_pde_offset = 3072 = ...
- 使用Mybatis Generator自动生成Mybatis相关代码
本文将简要介绍怎样利用Mybatis Generator自动生成Mybatis的相关代码: 一.构建一个环境: 1. 首先创建一个表: CREATE TABLE pet (name VARCHAR(2 ...
- K:树、二叉树与森林之间的转换及其相关代码实现
相关介绍: 二叉树是树的一种特殊形态,在二叉树中一个节点至多有左.右两个子节点,而在树中一个节点可以包含任意数目的子节点,对于森林,其是多棵树所组成的一个整体,树与树之间彼此相互独立,互不干扰,但其 ...
- js 横屏 竖屏 相关代码 与知识点
<!DOCTYPE html> <html> <head> <title></title> </head> <body&g ...
- 转:关于Latent Dirichlet Allocation及Hierarchical LDA模型的必读文章和相关代码
关于Latent Dirichlet Allocation及Hierarchical LDA模型的必读文章和相关代码 转: http://andyliuxs.iteye.com/blog/105174 ...
随机推荐
- 普通用户使用docker命令免sudo权限的问题
方法很多,只写一种 操作步骤: 使用有sudo权限的帐号登录系统. 创建docker分组,并将相应的用户添加到这个分组里面. sudo usermod -aG docker your_username ...
- Mac下的命令行自动补全功能
/usr/local/etc/bash_completion.d
- yum离线安装rpm包
CentOS利用yum下载好rpm包,并离线安装 1.联网安装好rpm包,并将下载好的包备好 #yum install --downloadonly --downloaddir=/home/sam ...
- jQuery()方法的第二个参数
关于jQuery()方法的第二个参数,有下面这几种用法: 1.jQuery(selector, [context]) 这种用法,相当于 $(context).find(selector) 或者 con ...
- PL/SQL学习笔记之基本块格式与语法
一:PL/SQL程序块 PL/SQL是一种块结构的语言,一个PL/SQL程序就是一个 代码逻辑块. PL/SQL程序由三部分构成: 1 声明 部分 使用关键字DECLARE开头,它是一个可选的部分,用 ...
- UICollectionView在初始化的时候移动到某个距离
#pragma mark -- 使用场景:选中非第一张图片用CollectionView进行浏览时,CollectionView滑动到对应的位置 #pragma mark -- 重点在于UICol ...
- 【转】CLR和JIT的理解、.NET反汇编学习
CLR:通用语言运行时(Common Language Runtime)的简称,CLR是.NET框架的核心内容之一,可以把它看为一套标准资源,可以呗任何.NET程序使用.它包括:面向对象的编程模型.安 ...
- StyleCop 代码走错 去掉 修改csproj文件
<Import Project="..\packages\StyleCop.MSBuild.4.7.55.0\build\StyleCop.MSBuild.Targets" ...
- 【Android】详解Android Service
目录结构: contents structure [+] Service简单概述 Service在清单文件中的声明 Service启动服务 Service绑定服务 扩展Binder类 使用Messen ...
- 实战c++中的vector系列--vector<unique_ptr<>>初始化(全部权转移)
C++11为我们提供了智能指针,给我们带来了非常多便利的地方. 那么假设把unique_ptr作为vector容器的元素呢? 形式如出一辙:vector<unique_ptr<int> ...