Problem with DropDownListBox?

Last post 04-18-2007 12:37 PM by exptrade2000. 2 replies.

Sort Posts:

  • Problem with DropDownListBox?

    04-18-2007, 11:54 AM
    • Contributor
      3,309 point Contributor
    • exptrade2000
    • Member since 03-03-2004, 5:01 AM
    • Allen, TX
    • Posts 710

    Hi, I have a dropdownlistbox in an update panel. I set the selected value in the code behind, I can step through it, correct values get set in other dependent controls based on the seleced value set but UI does not reflect change to the selected value of the drop down list. Has anybody experienced the same issue. Here is the code for it

     

    If serviceCenterId <> String.Empty Then

    ddlServiceCenter.SelectedValue = serviceCenterId

    Else

    ddlServiceCenter.SelectedValue =

    Me.DefaultServiceCenterId

    End If
    You died at the very end of your life
  • Re: Problem with DropDownListBox?

    04-18-2007, 12:16 PM
    • All-Star
      19,498 point All-Star
    • e_screw
    • Member since 10-20-2004, 1:22 PM
    • Women, Guitar, Russia, Billiards, Nature, .NET
    • Posts 3,893

    Do you have the Triggers defined for the UpdatePanel for the SelectedIndexChanged event of the Dropdownlist?

    Thanks

    Mark post(s) as "Answer" that helped you

    Electronic Screw
    Website||Blog||Dub@i.net
  • Re: Problem with DropDownListBox?

    04-18-2007, 12:37 PM
    • Contributor
      3,309 point Contributor
    • exptrade2000
    • Member since 03-03-2004, 5:01 AM
    • Allen, TX
    • Posts 710

    No, I have children as triggers set to true. Drop down boxes as injected dynamically into a div that is in the update panel. Number of ddl is dynamic, but id is assigned in the code behind. Viewstate works fine. Also what I noticed is that on first index change everything gets updated correctly but ddl reverts back to index 0. On second one is stays correct. But then if I open another row in datagrid, above code does not set the value to correct index, it sets it to 0.

    You died at the very end of your life
Page 1 of 1 (3 items)