New Posts New Posts RSS Feed: Databinders and ComboBoxes in DevForce 2012 WinClient VS 2013
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Databinders and ComboBoxes in DevForce 2012 WinClient VS 2013

 Post Reply Post Reply
Author
DenisK View Drop Down
IdeaBlade
IdeaBlade


Joined: 25-Aug-2010
Posts: 715
Post Options Post Options   Quote DenisK Quote  Post ReplyReply Direct Link To This Post Topic: Databinders and ComboBoxes in DevForce 2012 WinClient VS 2013
    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?
Back to Top
BillG View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 05-Dec-2007
Location: Monroe, MI
Posts: 233
Post Options Post Options   Quote BillG Quote  Post ReplyReply Direct Link To This Post 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
(link corrected by moderator)



Edited by DFFadmin - 23-Mar-2014 at 5:48pm
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down