Print Page | Close Window

Databinders and ComboBoxes in DevForce 2012 WinClient VS 2013

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2012
Forum Discription: For .NET 4.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=4660
Printed Date: 29-Apr-2025 at 12:29pm


Topic: Databinders and ComboBoxes in DevForce 2012 WinClient VS 2013
Posted By: BillG
Subject: Databinders and ComboBoxes in DevForce 2012 WinClient VS 2013
Date Posted: 21-Mar-2014 at 8:39am
I am sure i have what is a very simple problem. The documentation says that the databnding controls provided by IdeaBlade 4.1.3.1 should work with DevForce 2012. I am creating a winforms app using VS 2013, DevForce 2012, the winforms controls provided by Microsoft with Visual Studio in dotnet 4.5.

My issue is this.  I have created a sample app to illustrate the problem. I place all my controls on the dialog box. I place a BindingSource (MemberBS) on the form and a ControlBindingManager (MemberCBM) on the form. I go into the ControlBindingManager and configure databindings. I drag the member properties to the grid and associate them to the controls on the form. I have a combo box called StatusComboBox. I have a BindingSource called StatusBS which has a data source of MemberStatus. I drag the foreign property to the binding grid and associate that with the combo box. I set the listsource to the StatusBS and the DisplayMember to Description.

In my code behind class. I call

StatusBS.DataSource = Repository.GetMemberStatuses();

then i set the forms binding source.

MemberBS.DataSource = currentMember;

when the application is run, the members information is displayed in the forms controls. The combo box is filled with all the possible values for member status. but here is the problem

The current value of the members status is not displayed in the textfield of the combobox. it is blank. I have stepped through the code and the member does have a valid status and that status is in the combo box. For some reason i cant get the current value to display. What am i doing wrong. Am i setting up the binding wrong? I am just using the combo box that comes with Visual Studio.

I have attached a TestApplication that shows the problem. Could you please take a look at this and show me how to fix the problem. This issue is currently holding up my application.

Bill
http://www.ideablade.com/forum/uploads/202/TestApplication.zip - http://www.ideablade.com/forum/uploads/202/TestApplication.zip
(link corrected by moderator)




Replies:
Posted By: DenisK
Date Posted: 24-Mar-2014 at 12:21pm
Hi Bill,

Thank you for the sample application. Just to clarify, in the test application, the issue that you're trying to illustrate is that whenever you choose a Category and then choose a Supplier, the Category combo box gets reset to the default value of null and vice versa. Is this correct?



Print Page | Close Window