简体   繁体   中英

Devforce 7.2.2 and databinding and Winforms

My application is in Visual Studio 2013, .NET 4.5.1, DevForce IdeaBlade 7.2.2 and IdeaBlade databinding 4.1.3.

On a form, I drop a windows form combo box. I place a windows binding source on the form and set the DataSource property to DomainModel.Offce .

I then place an IdeaBlade Control Binding manager on the form. In the CBM I drag the Office object to the existing bindings tab. I set the control to the OfficeComboBox . I click the ListConverters properties button and set the ListSource to the OfficeBS binding source and the display member to OfficeName . The value member is _Self.

Here is the appropriate info from the Designer file

 listConverter2.DisplayMember = "OfficeName";
 listConverter2.ListSource = this.OfficeBS;

 // 
 // OfficeBS
 // 
 this.OfficeBS.DataSource = typeof(DomainModel.Office);


this.MemberBM.Descriptors.Add(new IdeaBlade.UI.WinForms.ControlBindingDescriptor(this.OfficeComboBox, typeof(DomainModel.Member), "Office1", listConverter2));

In the Form.cs file In my Load method I have the following code

OfficeBS.DataSource = Repository.GetOffices();

GetOffices() returns an IEnumerable<Office>

After this I set the forms binding source

MemberBS.DataSource = currentMember;

currentMember is the member that is currently being edited.

When the program is run. The form displays, the current members information is displayed. The Office ComboBox has all the offices listed.

Here is the problem. The text box portion of the Office ComboBox is blank. It should show the members current office but it is empty.

Am I missing something simple here?

可以在DevForce论坛上查看对此问题的响应。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM