DEV控件ComboBoxEdit附加下拉数据列方法(sqlhelper类自已找)

DEV控件ComboBoxEdit附加下拉数据列方法(sqlhelper类自已找)

不废话,看代码


        private void LoadComboBoxEdit()

        {
            this.txtDept.Properties.NullText = "请选择...";
            DataTable dt = ProcSqlHelper.ExecuteDatatable(@"select dept from dept", CommandType.Text, new SqlParameter[] { });
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                txtDept.Properties.Items.Add(dt.Rows[i]["dept"].ToString());
            }
        }
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章