我正在尝试使用DevExpress制作添加表单。在我的表单中,有一个lookUpEdit对象,我试图用来自数据集的列填充它。到目前为止,我写了这个:
this.companylookUpEdit.DataBindings.Add(new System.Windows.Forms.Binding("EditValue", this.incomesexpensesBindingSource, "company_id", true));
this.companylookUpEdit.EditValue = 1;
this.companylookUpEdit.Location = new System.Drawing.Point(100, 12);
this.companylookUpEdit.Name = "companylookUpEdit";
this.companylookUpEdit.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.companylookUpEdit.Properties.DataSource = this.companyBindingSource;
this.companylookUpEdit.Properties.DisplayMember = "name";
this.companylookUpEdit.Properties.ValueMember = "id";
this.companylookUpEdit.Size = new System.Drawing.Size(209, 20);
this.companylookUpEdit.TabIndex = 22;
我想展示来自companyBindingSource的公司name
,并将相应的公司id
作为属性推送到另一个数据集。
当我运行应用程序时,表单出现,但是当我点击向下箭头时,没有任何反应。任何人都可以帮我解决这个问题吗?