Home All Groups Group Topic Archive Search About
Author
23 Mar 2006 5:46 PM
Robe
Hi,

I have a datagrid with a combobox that contain the states of USA. And at his
right side there is another combobox with all the county of every state. Of
course both data (states and conties are stores in two tables respectively).

The question is, How can I show only the counties that belong to a state
depending on the state the user choose?

Thanks.

Author
24 Mar 2006 6:33 AM
Cor Ligthert [MVP]
Robe,

You can do that by a datarelation or by faking that by using a dataview. The
last I prever.

Have a look at this sample on our site, that it  is a datagrid and even 3
tables does not change the fun.

http://www.vb-tips.com/default.aspx?ID=cb1408ff-030d-4ea8-80b1-af26354b1fa0

With the combobox it is even much simpler.

I hope this helps,

Cor


Show quote
"Robe" <R***@discussions.microsoft.com> schreef in bericht
news:604D78C7-405D-468F-9B2E-32058B65DC9E@microsoft.com...
> Hi,
>
> I have a datagrid with a combobox that contain the states of USA. And at
> his
> right side there is another combobox with all the county of every state.
> Of
> course both data (states and conties are stores in two tables
> respectively).
>
> The question is, How can I show only the counties that belong to a state
> depending on the state the user choose?
>
> Thanks.
Author
24 Mar 2006 6:34 AM
Cor Ligthert [MVP]
Sorry,

It is inside the datagrid. That means that you need the datarelation.

Cor

AddThis Social Bookmark Button