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());
            }
        }
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章