原创

[DevExpress]Lookupedit之运用

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://david.blog.csdn.net/article/details/51119578
      private void cycletypeBind() 
        {
            luecycletype.Properties.NullText = "--请选择--";

            DataTable dt = new DataTable();

            dt.Columns.Add(new DataColumn("Text", typeof(string)));
            dt.Columns.Add(new DataColumn("Value", typeof(string)));

            DataRow dr = dt.NewRow();
            dr["Text"] = "立即";
            dr["Value"] = "I";
            dt.Rows.Add(dr);

            dr = dt.NewRow();
            dr["Text"] = "天";
            dr["Value"] = "D";
            dt.Rows.Add(dr);

            dr = dt.NewRow();
            dr["Text"] = "周";
            dr["Value"] = "W";
            dt.Rows.Add(dr);

            dr = dt.NewRow();
            dr["Text"] = "月";
            dr["Value"] = "M";
            dt.Rows.Add(dr);

            dr = dt.NewRow();
            dr["Text"] = "季";
            dr["Value"] = "Q";
            dt.Rows.Add(dr);

            dr = dt.NewRow();
            dr["Text"] = "年";
            dr["Value"] = "Y";
            dt.Rows.Add(dr);


            this.luecycletype.Properties.DataSource = dt;
            this.luecycletype.Properties.ValueMember = "Value";
            this.luecycletype.Properties.DisplayMember = "Text";
            this.luecycletype.Properties.ShowHeader = false;

        }


默认值:

luecycletype.EditValue = this.MT.cycletype;


文章最后发布于: 2016-04-11 10:29:16
展开阅读全文
0 个人打赏
私信求帮助

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 鲸 设计师: meimeiellie

分享到微信朋友圈

×

扫一扫,手机浏览