• DevGridLookUpEdit 的用法


    建 一个窗体名称为:frmAutoComplete

    其它先不说,直接将GridLookUpEdit控件拖上去,其它的多余设计,参与着可以自行拖放;

    这里就说一下这个控件怎么就自动给提示了,找了半天才算整出来了,去看资料,杯具了,全是E文呀,后悔E文学的差撒!!!!

    效果如图:

    雨凡

     效果就是上面的图,样式!

    还有下拉时候那个grid的设计,是单击gridlockEdit里面的design进行,设计打开页面如图:

    雨凡

      以上设计进行完整后,基本的配置就完了.

                private void frmAutoComplete_Load(object sender, EventArgs e)
            {
                DataTable dt = db.getDataTable("select ID,MC,DW,DJSJ from tb_Print");          

                this.gridLookUpEdit1.Properties.View.OptionsBehavior.AutoPopulateColumns = false;

                this.gridLookUpEdit1.Properties.DataSource = dt;  //数据源
                this.gridLookUpEdit1.Properties.DisplayMember = "MC"; //绑定Text显示的字段源名称
                this.gridLookUpEdit1.Properties.ValueMember = "ID"; //绑定Value字段源名称

                this.gridLookUpEdit1.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True;
                this.gridLookUpEdit1.Properties.View.BestFitColumns();
                this.gridLookUpEdit1.Properties.ShowFooter = false;
                this.gridLookUpEdit1.Properties.View.OptionsView.ShowAutoFilterRow = true; //显示不显示grid上第一个空行,也是用于检索的应用
                this.gridLookUpEdit1.Properties.AutoComplete = false;
                this.gridLookUpEdit1.Properties.ImmediatePopup = true;
                this.gridLookUpEdit1.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains;                 
                this.gridLookUpEdit1.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard; //配置,用于像文本框那样呀,可自己录入,选择,些处是枚举,可自行设置.

            }

    以上的操作将可完成,以上的效果.

    初次应用,如有那有错的地方,朋友们提出来,一起进步!!!

     谢了

  • 相关阅读:
    office excel无法打开超链接解决方法
    mysql默认的数据库介绍(还没看,找时间研究)
    mysql目录结构及配置文件
    springboot-actuator应用后台监控
    服务器端负载均衡和客户端负载均衡的区别
    Spring Cloud Eureka 自我保护机制
    HDU 4028 The time of a day (dp+离散化)
    HDU 3652 B-number(数位DP)
    HDU 2966 In case of failure
    HDU 3622 Bomb Game
  • 原文地址:https://www.cnblogs.com/yhongl/p/3937922.html
Copyright © 2020-2023  润新知