473,405 Members | 2,373 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,405 software developers and data experts.

Data Relationship binding

I have two Dropdownlist and one which is containing States and one
containing Cities. I know how to do all the little databinding task in
visual studios interface as well as set the relationship (parent, child,
etc.). In the code behind file in page_load event I fill the data adapter
and databind the State dropdownlist. I also set the on_change event for the
Cities dropdownlist after a state is selected. However, When I run this page
in the browser the state dropdownlist populate with the States, but after
selecting a State the Cities dropdownlist DO NOTHING.
What I'm I doing wrong? Could some one please send me some code that handle
these action?
I'm working with stored procedures from sql2000. Should I just set up a
parameter procedure for the Cities dropdownlist (instead of Relationship in
vs.net) and pass in the selected State?
Nov 17 '05 #1
2 2079

But when doing things that way I get a System.Data.RelatedView message in
the child related (Cities) dropdownlist. What could I possibly be doing
wrong?

"Pete Wright" <pe**@codemonkey.demon.co.uk> wrote in message
news:be********************@news.demon.co.uk...
I'm not sure I have a very good handle on exactly what it is your code is
doing, but your problem lies with how you've bound. Bind the cities drop
down to the relationship, not the table. That way it should refresh when the state is changed.

--
Peter Wright
Author of ADO.NET Novice To Pro, from Apress Inc.
_____________________________
"Leon Shaw" <vn*****@msn.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I have two Dropdownlist and one which is containing States and one
containing Cities. I know how to do all the little databinding task in
visual studios interface as well as set the relationship (parent, child,
etc.). In the code behind file in page_load event I fill the data adapter and databind the State dropdownlist. I also set the on_change event for

the
Cities dropdownlist after a state is selected. However, When I run this

page
in the browser the state dropdownlist populate with the States, but after selecting a State the Cities dropdownlist DO NOTHING.
What I'm I doing wrong? Could some one please send me some code that

handle
these action?
I'm working with stored procedures from sql2000. Should I just set up a
parameter procedure for the Cities dropdownlist (instead of Relationship

in
vs.net) and pass in the selected State?


Nov 17 '05 #2

But when doing things that way I get a System.Data.RelatedView message in
the child related (Cities) dropdownlist. What could I possibly be doing
wrong?

"Pete Wright" <pe**@codemonkey.demon.co.uk> wrote in message
news:be********************@news.demon.co.uk...
I'm not sure I have a very good handle on exactly what it is your code is
doing, but your problem lies with how you've bound. Bind the cities drop
down to the relationship, not the table. That way it should refresh when the state is changed.

--
Peter Wright
Author of ADO.NET Novice To Pro, from Apress Inc.
_____________________________
"Leon Shaw" <vn*****@msn.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I have two Dropdownlist and one which is containing States and one
containing Cities. I know how to do all the little databinding task in
visual studios interface as well as set the relationship (parent, child,
etc.). In the code behind file in page_load event I fill the data adapter and databind the State dropdownlist. I also set the on_change event for

the
Cities dropdownlist after a state is selected. However, When I run this

page
in the browser the state dropdownlist populate with the States, but after selecting a State the Cities dropdownlist DO NOTHING.
What I'm I doing wrong? Could some one please send me some code that

handle
these action?
I'm working with stored procedures from sql2000. Should I just set up a
parameter procedure for the Cities dropdownlist (instead of Relationship

in
vs.net) and pass in the selected State?


Nov 17 '05 #3

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

Similar topics

2
by: Matthias S. | last post by:
Hi, I have to write an application which extensively uses an SQL Database. For a simple example say I have the following tables with the appropriate fields. 1. Company (ID, Name,...
1
by: Moojjoo | last post by:
Good Monday Morning: I am at a dead stop and I am hoping some other developers out there can help me out. I have built a dataset that first contains a table populated from SQL Server then I am...
2
by: Christopher Weaver | last post by:
I have a DataSet with two tables and a DataRelation. When I populate the DataSet and define a master detail relationship through the DataRelation, the grid bound to the master table shows both...
18
by: D Witherspoon | last post by:
I am developing a Windows Forms application in VB.NET that will use .NET remoting to access the data tier classes. A very simple way I have come up with is by creating typed (.xsd) datasets. For...
5
by: Kent Boogaart | last post by:
Hi, I have some hierarchical data (FAQs) that I would like to bind to. The basic structure is: FAQ Category + Categories + FAQs So an FAQ category has any number of sub-categories and any...
0
by: mjsterz | last post by:
I've been working with VB .NET for less than a year and this is the first time I've posted on one of these groups, so let me apologize beforehand if I'm being unclear, not posting my issue...
13
by: Alan Silver | last post by:
Hello, MSDN (amongst other places) is full of helpful advice on ways to do data access, but they all seem geared to wards enterprise applications. Maybe I'm in a minority, but I don't have those...
1
by: Ginger Estherskip | last post by:
I'm setting up a dataset using the GUI to have a Parent Data Table and a few Child Data Tables. I then have a form that uses that dataset, and I can fill the appropriate datatables et. al., but...
6
by: Wesley Peace | last post by:
I hate to cross post, but I've gotten no answer yet on a problem I'm having with visual studio 2008. I've created a series of forms with controls to access a Access database tables. The...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...
0
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.