New Posts New Posts RSS Feed: synchronizing textbox to combobox
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

synchronizing textbox to combobox

 Post Reply Post Reply
Author
mea1 View Drop Down
Newbie
Newbie


Joined: 27-Jan-2008
Posts: 3
Post Options Post Options   Quote mea1 Quote  Post ReplyReply Direct Link To This Post Topic: synchronizing textbox to combobox
    Posted: 27-Jan-2008 at 8:43am

Hi,

 

I am exploring Devforce by converting a small App I developed some time ago. I would like to be able (in loose controls) to enter a product code in a text box and its description should show in linked product combobox, and if the combobox is changed the textbox should show the product code.

 

similarly I would like to do the same for a grid control so that entering a product code shows its description in the adjacent combobox, and also its price in another textbox.

 

 
Back to Top
davidklitzke View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 14-Jun-2007
Posts: 715
Post Options Post Options   Quote davidklitzke Quote  Post ReplyReply Direct Link To This Post Posted: 27-Jan-2008 at 9:23am
The typical way that this is done is by having a BindingSource that is shared by all or most of the controls on the form.  When the current position in the BindingSource changes, all of the controls that are bound to the BindingSource are updated.  For example, in a large number of the tutorials, the BindingNavigator and the ControlBindingManager use the same BindingSource.
Back to Top
mea1 View Drop Down
Newbie
Newbie


Joined: 27-Jan-2008
Posts: 3
Post Options Post Options   Quote mea1 Quote  Post ReplyReply Direct Link To This Post Posted: 27-Jan-2008 at 7:02pm

I do have one Bindingsource. when I try to use the textbox, it shows an error of invalid cast

Back to Top
davidklitzke View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 14-Jun-2007
Posts: 715
Post Options Post Options   Quote davidklitzke Quote  Post ReplyReply Direct Link To This Post Posted: 27-Jan-2008 at 7:26pm
Send a small reproducible case (preferably using IdeaBladeTutorial database) to support@ideablade.com.
Back to Top
mea1 View Drop Down
Newbie
Newbie


Joined: 27-Jan-2008
Posts: 3
Post Options Post Options   Quote mea1 Quote  Post ReplyReply Direct Link To This Post Posted: 30-Jan-2008 at 10:25am

The problem was that the Table name and the field name are the same although different case.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down