[DevExpress]利用LookUpEdit实现类似自动提示效果

简介: 原文:[DevExpress]利用LookUpEdit实现类似自动提示效果关键代码: public static void BindWithAutoCompletion(this LookUpEdit lue, object source, string value, strin...
原文: [DevExpress]利用LookUpEdit实现类似自动提示效果

关键代码:

        public static void BindWithAutoCompletion(this LookUpEdit lue, object source, string value, string displayName, string prompttext)
        {
            lue.Properties.DataSource = source;
            lue.Properties.DisplayMember = displayName;
            lue.Properties.ValueMember = value;
            lue.Properties.NullText = prompttext;
            lue.Properties.TextEditStyle = TextEditStyles.Standard;
            lue.Properties.SearchMode = SearchMode.AutoFilter;
        }

使用代码:

this.lookUpEdit1.BindWithAutoCompletion(PersonList, "Name", "Name", "输入需要搜索的....");

实现效果:

image

image

希望有所帮助!微笑

目录
相关文章
|
5月前
Visual Studio Code开发常用的工具栏选项,查看源码技巧以及【vscode常用的快捷键】
Visual Studio Code开发常用的工具栏选项,查看源码技巧以及【vscode常用的快捷键】
258 0
|
7月前
Androidstudio中界面设计无法拖动问题解决方法
Androidstudio中界面设计无法拖动问题解决方法
103 0
|
iOS开发
Xcode插件
Xcode插件
638 0
Xcode插件
Devexpress treelist 控件属性大全
属性列表 1、OptionsSelection: EnableAppearanceForcusedCell:选中的Cell的Appearance设置是否可用。默认为True; EnableAppearanceForcusedRow:选中的Node的Appearance设置是否可用。
1697 0
vs2010中工具箱不显示DevExpress控件的解决办法
vs2010中工具箱不显示DevExpress控件的解决办法 开始安装时,在vs2010中工具箱正常显示开发快车DevExpress10.2控件, 几次打开关闭项目后,有时就出现工具箱中全部或大部分DevExpress控件就不显示了(包括c/s 和b/s项目) 然后在网上搜索,cmd下重新注册后正常:   找到目录D:\Program Files\DevExpress 2010.
2526 0

热门文章

最新文章