码迷,mamicode.com
首页 > 其他好文 > 详细

GridLookUpEdit 简单应用

时间:2017-05-27 20:07:40      阅读:258      评论:0      收藏:0      [点我收藏+]

标签:应用   utils   appear   strong   span   XML   mode   content   grid   

技术分享

在属性列表中 Properties  -> view  就可以打开设计器进行编辑

技术分享

后台代码:

 DataTable dtt = stu.StuGetFind(sxml, 1, 50).Tables[0];
            DataView dv = new DataView(dtt);
            dtt = dv.ToTable(true, new string[] { "Stu_ID", "Stu_Number", "Stu_Name" });
            //绑定
            gridlup.Properties.DataSource = dtt;
            gridlup.Properties.ValueMember = "Stu_ID";
            gridlup.Properties.DisplayMember = "Stu_Name";

            this.gridlup.Properties.View.OptionsBehavior.AutoPopulateColumns = false;
            //默认值
            this.gridlup.Properties.NullText = "------请选择------";
            //文本居中对齐
            this.gridlup.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
            this.gridlup.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True;
            this.gridlup.Properties.View.BestFitColumns();
          
            //显示不显示grid上第一个空行,也是用于检索的应用
            this.gridlup.Properties.View.OptionsView.ShowAutoFilterRow = true;
            //下面两行是为了更好的用户体验
            this.gridlup.Properties.AutoComplete = false;
            this.gridlup.Properties.ImmediatePopup = true;
            this.gridlup.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains;
            //能否够输入内容进行检索(还是仅仅能使用选择输入)
            this.gridlup.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard;
            //是否显示底部
            this.gridlup.Properties.ShowFooter = false;


GridLookUpEdit 简单应用

标签:应用   utils   appear   strong   span   XML   mode   content   grid   

原文地址:http://www.cnblogs.com/clnchanpin/p/6914196.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!