CascaadingDropDownList on edit page

Last post 11-16-2009 5:18 AM by Zhi-Qiang Ni - MSFT. 3 replies.

Sort Posts:

  • CascaadingDropDownList on edit page

    11-11-2009, 2:08 PM
    • Member
      36 point Member
    • bedubs
    • Member since 04-03-2007, 1:58 PM
    • Tx
    • Posts 104

    C# I have a basic form to insert Events, I have 2 cascadingDropDownLists for Property and Location... Ok thats fine... Now i have an Edit Events page, and want to have the cascading dropdowns already pre-populated with teh information in the database... 

    I've tried:

    ListItem item = DropDownList1.Items.FindByValue(DataRow1["Property"].ToString()));
    if (item != null)
    {
    item.Selected = true;
    }


    and now, i dont know what else to try... Or any suggestions around this would be great... Thanks. 

  • Re: CascaadingDropDownList on edit page

    11-11-2009, 2:59 PM
    • Member
      14 point Member
    • aforalok
    • Member since 11-05-2009, 7:14 AM
    • Posts 2

    plzz elaborate on exactly wat u need to do..??

    if u want the cascading dropdows to be pre populated with th info in the databse, u can easily do so

    by binding a desired datasourse to the drop downs....


    alok


  • Re: CascaadingDropDownList on edit page

    11-11-2009, 4:23 PM
    • Member
      36 point Member
    • bedubs
    • Member since 04-03-2007, 1:58 PM
    • Tx
    • Posts 104

    Sure thing.

    I have a list of properties... PropertyA, PropertyB, PropertyC, and Locations, Location1, Location2, Location3...

    --Select Property--
    --Select Location--

    My event will happen at PropertyC and i need to change the date of the event, so i click on Edit Event... All of the fields pre-populate with the information already in the database from when i created the event... I dont know how to select the selected item in the CascadingDropDownlist...  

    -- PropertyC--
    --Location1--

  • Re: CascaadingDropDownList on edit page

    11-16-2009, 5:18 AM
    Answer
    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as
    Answer” if a marked post does not actually answer your question.
Page 1 of 1 (4 items)