devExpress lookUpEdit does not show colums coming from dataset

161 Views Asked by At

I am trying to make an adding form with DevExpress. In my form, there is a lookUpEdit object and I am trying to fill it with columns coming from a dataset. So far, I wrote this:

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;

I want to show company name coming from companyBindingSource, and push corresponding company id to another dataset as an attribute.

When I run the application, the form appears, but when I click to the down arrow, nothing happens. Can anyone help me about this?

0

There are 0 best solutions below