您当前的位置: 首页 > 

[DevExpress]控件之GridLookupedit的运用

发布时间:2016-04-11 10:32:36 ,浏览量:0

代码:

#region 内部主题绑定
        private void gridLookupeditBind() 
        {
            DataTable dt = new DataTable();
            string strSql = "SELECT [ID],[subject],[htmlURL] FROM [OA].[dbo].[OA_SubjectQuery]";
            dt = DbHelperSQL.Query(strSql).Tables[0];

            try 
            {
                this.gloksubject.Properties.DataSource = dt;
                this.gloksubject.Properties.DisplayMember = dt.Columns[1].ColumnName;
                this.gloksubject.Properties.ValueMember = dt.Columns[2].ColumnName;

                this.gloksubject.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True;
                this.gloksubject.Properties.View.BestFitColumns();
                this.gloksubject.Properties.ShowFooter = false;
                this.gloksubject.Properties.View.OptionsView.ShowAutoFilterRow = true; //显示不显示grid上第一个空行,也是用于检索的应用
关注
打赏
1688896170
查看更多评论

暂无认证

  • 0浏览

    0关注

    105950博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文
立即登录/注册

微信扫码登录

0.0848s