473,320 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

C# Form Parent-Child ComboBoxes and DataSet, DataBinding, and BindingNavigator

Hello All,

I am writing a form that allows maintenance of the fields of a table. Two of the controls on the form are comboboxes, where selecting a value in combobox A filters what appears in combobox B. The combo boxes are bound to separate tables (e.g. state and city tables).

For example, A might be State, and B might be City. Select a State, and the City list changes.

I have gotten most of it done, but I have run into some snags. Some additional details:

1. The State and City values may be null, so I have added a row to the City table in my DataSet containing a new row for the blank option. I did this in my Load method along with Filling my TableAdapters.

2. I have SelectedIndexChanged for A implementing the code that updates B. This code sets a Filter on the BindingSource (selects for the selected State, and the null entry).

Issue: When I navigate from record to record, instead of the "null" city appearing (if the database has a null), the first "real" value is selected instead.

I have gone round and round on this, trying lots of different things, but I am pretty sure I am missing something obvious. It can't be too hard can it?

Please help!

Todd
Jul 16 '08 #1
0 2270

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Weaver | last post by:
I'm new to Access. But I've been ooping for about twelve or thirteen years in another language. I've got a form with two instances of the same sub-form. It works quite well, or at least it...
7
by: sara | last post by:
I guess this is simple, but I'm stuck. I am trying to write a simple app - Newspapers and their circulation by town. tables: tblPaper - ID (autonum, key) and Newspaper (indexed) tblTown - ID...
11
by: Jozef | last post by:
I have some old code that I use from the Access 95 Developers handbook. The code works very well, with the exception that it doesn't seem to recognize wide screens, and sizes tab controls so that...
3
by: David N | last post by:
Hi All, I just wonder if in C#, I can develop a user defined control that can call its parent function which is not yet developed. For example, how do I make my user control call a...
2
by: Mystery Man | last post by:
I have developed a series of user defined controls. These have been placed on a variety of different forms. From within one of these controls, I want to show another dialog directly to the right...
37
by: Geoff Jones | last post by:
Hi Suppose I have two forms: Form1 and Form2. I create and show an instance of Form2 in the code of Form1 e.g. Dim myForm2 = New Form2 myForm2.Show() How do I tell myForm2 that Form1 is...
4
by: gsb58 | last post by:
Hi! On a form I have a calendar. The form is rezised to 1024x768 (Don't worry - this is a training case) when loaded. Now I want to center the calendar on the form so that its edges are...
3
by: bsturg21 | last post by:
Hello, I have a windows form that has a series of linklabels on it, and I need to have each linklabel, when clicked, open a separate windows form that has a single paramter passed into it. The...
1
by: IframeLearner | last post by:
Hi , I am trying to upload a file from a parent.jsp using Iframes. From Parent page. I have to save Subject, Desc, File and file name. to upload the file i am using Iframe. I want the...
2
by: dynamictiger | last post by:
I am building a wizard and have an issue with one sub form. Whilst all others are about 5 fields tall this one is 15 fields. My choices are either to resize the parent form ridiculously large for...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.