Data Relationship binding

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default 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?


    Leon Shaw Guest

  2. Similar Questions and Discussions

    1. Data Binding
      I have a webService, dataSet, comboBox and a sumbitButton. The combobox loads and displays Brands from my cfc. I press submit and look at the...
    2. Complex data binding question, binding child objects of a custom collection.
      I have a custom collection of objects, each of which includes a child object called MyUserOpener. In declarative binding, I can bind this property...
    3. Binding Data
      Currently, when I bind data to a DataGrid, I use a function as such: Dim conGrid As SqlClient.SqlConnection Dim daGrid As...
    4. Where's my mx.data.binding?
      I bought and downloaded MX 2004 Professional, but it seems to be missing a whole folder of classes (not sure how this happened): I can't find...
    5. Many-to-Many Relationship Data Display in Forms
      I have a many-to-many relationship between Books and Authors by ISBN and Author name. I.e. Books can have more than one Author, and Authors can be...
  3. #2

    Default Re: Data Relationship binding


    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" <pete@codemonkey.demon.co.uk> wrote in message
    news:benc91$ogq$10$8302bc10@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" <vnality@msn.com> wrote in message
    > news:%23lrsHFxRDHA.1868@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?
    > >
    > >
    >
    >

    Leon Shaw Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139