Print Page | Close Window

synchronizing textbox to combobox

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=667
Printed Date: 12-Apr-2026 at 6:24am


Topic: synchronizing textbox to combobox
Posted By: mea1
Subject: synchronizing textbox to combobox
Date 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.

 

 



Replies:
Posted By: davidklitzke
Date 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.


Posted By: mea1
Date 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



Posted By: davidklitzke
Date Posted: 27-Jan-2008 at 7:26pm
Send a small reproducible case (preferably using IdeaBladeTutorial database) to support@ideablade.com.


Posted By: mea1
Date Posted: 30-Jan-2008 at 10:25am

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




Print Page | Close Window