473,569 Members | 2,590 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Having a problem using combobox in bound tables in Vs2005 Winforms

I have a table of addresses and it contains a CountryId which points to a
table of countries. The datatstructure of the Countries Lookup tables is
actually created from three tables - a CountryIdtable - a Countries
localized tables and an cultures tables From which I extract a dataset
select CountryID - CountryName - Culture name (with inner joins between the
three) where CultureName = CurrentCulture. CurrentUiCultur e.tostring. So I
would see the data in the datatset used fro the country lookups as follows
if the UI was in english,
1, Canada, en-US
1, US, en-US

In french I woud see
1, Canada, fr-CA
1, États-Unis, fr-CA

I created a form, on which I placed the textboxes for the addresses various
fields and a combobox for the countries. I have a dataset for the companies,
a binding source and a binding navigator as well as a tableadapter for the
companies. The textboxes get bound automatically to the
CompaniesBindin gSource, and that seems to work fine.

I also have a dataset for the Countries , There is a table adapter for the
countries . These got create automatically when I placed a grid to show the
countries on the form (I wanted to see if the countries got filled up
corrcetly with records for the correct Culture, they do.)

Now for the problem. I had the countryID field in table countries configured
to use a combobox. When the combobox got created it bound the selectedItem
to the CompaniesBindin gSource - CountryId which seems correct. I then went
in and set the datasource to the Countries dataset, the DisplayItem to the
CountryName and the ValueItem to the CountryId. I automatically fill the
dataset for the countries on the form load event then the dataset for the
addresses, before filling the datatset for the addresses.

The problem is that the combobox shows the name of the Country OK but as
soon as I click on the down arrow of the Combobox, all my other controls on
the form freeze, all I can do is close the form using the cross in upper
right hand corner.

What am I doing wrong, Is there somewhere a sample form that I can look at
that does what I am trying to do?

Thanks for any help.

Bob
Aug 8 '07 #1
1 1758
Disregard, continued playing around withe them and found it.
Thanks
"Robert Dufour" <bd*****@sgiims .comwrote in message
news:Oc******** ******@TK2MSFTN GP06.phx.gbl...
>I have a table of addresses and it contains a CountryId which points to a
table of countries. The datatstructure of the Countries Lookup tables is
actually created from three tables - a CountryIdtable - a Countries
localized tables and an cultures tables From which I extract a dataset
select CountryID - CountryName - Culture name (with inner joins between the
three) where CultureName = CurrentCulture. CurrentUiCultur e.tostring. So I
would see the data in the datatset used fro the country lookups as follows
if the UI was in english,
1, Canada, en-US
1, US, en-US

In french I woud see
1, Canada, fr-CA
1, États-Unis, fr-CA

I created a form, on which I placed the textboxes for the addresses
various fields and a combobox for the countries. I have a dataset for the
companies, a binding source and a binding navigator as well as a
tableadapter for the companies. The textboxes get bound automatically to
the CompaniesBindin gSource, and that seems to work fine.

I also have a dataset for the Countries , There is a table adapter for the
countries . These got create automatically when I placed a grid to show
the countries on the form (I wanted to see if the countries got filled up
corrcetly with records for the correct Culture, they do.)

Now for the problem. I had the countryID field in table countries
configured to use a combobox. When the combobox got created it bound the
selectedItem to the CompaniesBindin gSource - CountryId which seems
correct. I then went in and set the datasource to the Countries dataset,
the DisplayItem to the CountryName and the ValueItem to the CountryId. I
automatically fill the dataset for the countries on the form load event
then the dataset for the addresses, before filling the datatset for the
addresses.

The problem is that the combobox shows the name of the Country OK but as
soon as I click on the down arrow of the Combobox, all my other controls
on the form freeze, all I can do is close the form using the cross in
upper right hand corner.

What am I doing wrong, Is there somewhere a sample form that I can look at
that does what I am trying to do?

Thanks for any help.

Bob

Aug 8 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
1796
by: Marty | last post by:
Hi, Ok I use the OLEDBConnector and dataset to retrieve data from my Access DB. I have a problem to read/parse the dataset and I would like to know if I am using the right object to reach my goal. And I don't want to spend hours to find out, would you tell me if I'm going in the wrong path? Private dbConnector As New OleDbConnection
3
1975
by: Pete | last post by:
I'm currently doing a database that uses comboboxes to look up records in other tables, whether they be lookup tables or otherwise. When a user needs to add an item to one of these tables, the user has to either double-click on the combobox or go to the appropriate form via an item on the main menu. So, using an example, if someone is...
6
309
by: William Bradley | last post by:
I have a production table and its accompanying form. There can be up to ten ingredients in what is produced. The ingredients are obtained from the incoming goods table which supplies the two parameters that I use, "Name" and "CatlogNo". This production table needs to contain each ingredient by name and catalogue number. With help from...
4
3159
by: Kathy | last post by:
What is the standard technique for handling the fields in the following scenario on a continuous form? Multiple Divisions. Each Division has multiple Buildings. Each Building has a Supervisor. Tables: (abbreviated) TblDivision DivisionID
5
1603
by: Mika M | last post by:
Hello! I have Windows Forms application form containing TextBoxes, six ComboBoxes, and DataGrid for details. I have created DataSet with needed tables, and created relations between tables, and bound controls to datatables. Everything is working almost fine including saving data, but when I press 'New' - button ... ...
0
935
by: jaYPee | last post by:
i have downloaded an example of a combobox in datagrid from this site http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q480q it works great except that there are some minor problem. this is what i have discover from this sample. when i go to the new row in datagrid with this combobox bound and click the combobox sometimes there is a...
6
2858
by: dbuchanan | last post by:
VS2005 I've been reading all the help I can on the topic (MSDN, other) but I can't make sense of this. Desired behavior; The user is to choose from the displayed list of the databound combobox and the coresponding 'Id' from the lookup table is to be inserted into the field of the new record. I have two simple tables. "tblPerson" is the...
5
2583
by: njb35 | last post by:
Hi all I'm beginning my foray from VBA into VB 2005 Express, and enjoying some of the efficiencies it provides! I'm stuck with some dataset handling however that I _think_ can be automated but I can probably code what I want to do the hard way. I've searching around online but can't find an answer to this specific question. Here's the...
4
2468
by: Karl | last post by:
Using A2000 with 2 tables Table 1 is a reference table with 2 fields Table 2 has 2 fields and 2 combo boxes to lookup date in table 1 Combo1 binds to col 1 in table 1, this works OK Combo 2 is set to bind to col 2 in table 1 but it always binds col 1 Column Count is set to 2 and I can see both columns in the dropdown Bound Column is...
0
7615
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8130
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7677
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7979
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2115
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1223
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
940
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.