详解DevExpress.LookUpEdit控件实现自动搜索定位功能


  详解DevExpress.LookUpEdit控件实现自动搜索定位功能
C/S框架网|www.csframework.com|CSFramework.com|详解DevExpress.LookUpEdit控件实现自动搜索定位功能

详解DevExpress.LookUpEdit控件实现自动搜索定位功能


首先介绍三个重要的属性:

1. LookUpEdit.Properties.ImmediatePopup 在输入框按任一可见字符键时立即弹出下拉窗体。
2. LookUpEdit.Properties.AutoSearchColumnIndex 设置自动搜索的栏位序号,下拉窗体第一个栏位为0,依此类推,此属性配合SearchMode=OnlyInPopup时有效。
3. LookUpEdit.Properties.SearchMode 自动搜索定位模式

贴图图片


关于枚举类型SearchMode的定义:



C# Code:

    // Summary:
    //     Enumerates search modes for a lookup edior.

    public enum SearchMode
    {
        // Summary:
        //     The incremental search is enabled only when the dropdown window is open.
        //     If the window is closed, the user can modify the text in the edit box. However
        //     these changes are ignored.
        //     When the dropdown is open the incremental search is performed against the
        //     column whose index is specified by the DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit.AutoSearchColumnIndex
        //     property. The header of this column contains the search icon (binoculars).
        //     The user can click a specific column header to perform the search against
        //     this column.
        //     The following screenshot shows a sample lookup editor. The incremental search
        //     is performed against the second column.

        OnlyInPopup = 0,
        //
        // Summary:
        //     Enables the automatic completion feature. In this mode, when the dropdown
        //     is closed, the text in the edit box is automatically completed if it matches
        //     a DevExpress.XtraEditors.Repository.RepositoryItemLookUpEditBase.DisplayMember
        //     field value of one of dropdown rows.
        //     When the dropdown is open, the automatic completion feature is disabled but
        //     the editor allows you to perform an incremental search in the same manner
        //     as when DevExpress.XtraEditors.Controls.SearchMode.OnlyInPopup mode is active.

        AutoComplete = 1,
        //
        // Summary:
        //     Enables the incremental filtering feature. When you type within the edit
        //     box, the editor automatically opens the dropdown window and displays only
        //     records whose DevExpress.XtraEditors.Repository.RepositoryItemLookUpEditBase.DisplayMember
        //     field value starts with the characters typed. Other records are not displayed.
        //     If you enter a value that does not match any record, the dropdown window
        //     will not contain any rows.
        //     The following image shows a lookup editor when AutoFilter mode is enabled.

        AutoFilter = 2,
    }



//来源:C/S框架网(www.csframework.com) QQ:1980854898



OnlyInPopup : 配合ImmediatePopup=True时使用,当用户在输入框按任一可见字符键时立即弹出下拉窗体,并跟据输入的字符从头部开始匹配AutoSearchColumnIndex属性指定栏位字段的值,第一个栏位为0.

特点:在下拉窗体能显示匹配结果(蓝底白字),但在输入框内不显示。

效果图如下:

贴图图片


AutoComplete: 配合ImmediatePopup=True时使用,当用户在输入框按任一可见字符键时立即弹出下拉窗体,并在输入框自动完成您想要输入的数据,同时下拉窗体自动匹配最佳记录。AutoComplete模式仅匹配DisplayMember对应字段的值。

特点:能在输入框显示匹配的数据,并且下拉窗体显示匹配的记录。

效果图如下:

贴图图片

AutoFilter: 配合ImmediatePopup=True时使用,当用户在输入框按任一可见字符键时立即弹出下拉窗体,并在输入框自动完成您想要输入的数据,同时下拉窗体自动过滤掉不匹配的记录。

特点:能在输入框显示匹配的数据,并过滤过不想要的记录。


贴图图片




C/S框架网|原创精神.创造价值.打造精品

扫一扫加微信
C/S框架网作者微信 C/S框架网|原创作品.质量保障.竭诚为您服务


版权声明:本文为开发框架文库发布内容,转载请附上原文出处连接
C/S框架网
上一篇:《CS框架局域网版本自动升级解决方案》.doc
下一篇:注意:更新表结构后一定要刷新相关的View!
评论列表

发表评论

评论内容
昵称:
关联文章

详解DevExpress.LookUpEdit实现自动搜索定位功能
LookUpEdit带给用户良好的操作体验
C#实现DevExpress换肤功能
C# 实现完整功能的截图(1)-实现绘图工具栏
C# GridView列头添加CheckBox实现全选功能
.NET RichTextBox使用详解
使用Scheduler实现生产进度监控程序
(C#)RichTextBox查找文本演示(功能全)
DevExpress LookupEdit应用 - 下拉选择自动带出资料给其他文本框组件
手工添加DevExpress库到工具箱
C# 实现条码图片自动生成功能
DevExpress换肤详解
DevExpress 通过小三角图标变更类型
请问开发框架中是否用到DevExpress?
C# Barcode条码使用方法
C#.Net自定义 - GridPopupContainerEdit
C# C/S框架高级搜索功能-接口设计
基类窗体处理按回车键自动跳到下一输入
界面内按回车键自动激活下一个
DevExpress Winform 利用GridControl开发的会计凭证(C#源码)

热门标签
.NET5 .NET6 .NET7 APP Auth-软件授权注册系统 Axios B/S B/S开发框架 Bug Bug记录 C#加密解密 C#源码 C/S CHATGPT CMS系统 CodeGenerator CSFramework.DB CSFramework.EF CSFrameworkV1学习版 CSFrameworkV2标准版 CSFrameworkV3高级版 CSFrameworkV4企业版 CSFrameworkV5旗舰版 CSFrameworkV6.0 DAL数据访问层 Database datalock DbFramework Demo教学 Demo下载 DevExpress教程 DOM EF框架 Element-UI EntityFramework ERP ES6 Excel FastReport GIT HR IDatabase IIS JavaScript LINQ MES MiniFramework MIS NavBarControl Node.JS NPM OMS ORM PaaS POS Promise API Redis SAP SEO SQL SQLConnector TMS系统 Token令牌 VS2022 VSCode VUE WCF WebApi WebApi NETCore WebApi框架 WEB开发框架 Windows服务 Winform 开发框架 Winform 开发平台 WinFramework Workflow工作流 Workflow流程引擎 版本区别 报表 踩坑日记 操作手册 代码生成器 迭代开发记录 基础资料窗体 架构设计 角色权限 开发sce 开发技巧 开发教程 开发框架 开发平台 开发指南 客户案例 快速搭站系统 快速开发平台 秘钥 密钥 权限设计 软件报价 软件测试报告 软件简介 软件开发框架 软件开发平台 软件开发文档 软件体系架构 软件下载 软著证书 三层架构 设计模式 生成代码 实用小技巧 收钱音箱 数据锁 数据同步 微信小程序 未解决问题 文档下载 喜鹊ERP 喜鹊软件 系统对接 详细设计说明书 行政区域数据库 需求分析 疑难杂症 蝇量级框架 蝇量框架 用户管理 用户开发手册 用户控件 在线支付 纸箱ERP 智能语音收款机 自定义窗体 自定义组件 自动升级程序