Dependent combobox not populated
Last Post 05-23-2007 05:50 PM by Brian Corn. 2 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
Brian CornUser is Offline
skipping stones
skipping stones
Posts:13
Avatar

--
05-22-2007 01:29 AM

    I have two comboboxes to support Country and Region, a common setup among DNN registration tabs it seems.  I am using the dynamic SQL found within the forum (see below) to ensure the Region combobox changes as the Country selected changes (currently only for United States and Canada).  This works great for the initial registration.  However, when the user logs into the portal and attempts to update his/her profile, the Region combobox is not populated in the case that the user selected United States or Canada as the Country.  The data in the underlying tables (both Code and Dynamic Registration tables) contains the expected Country and Region values.

    select ' - Please make a selection - ' as QuestionOption, '0' as QuestionOptionValue, -1000 as SortOrder
    Union All
    select Text as QuestionOption, Value as QuestionOptionValue, SortOrder
    from dnn_Lists
    where ListName='Region' and ParentID= (select EntryID from dnn_Lists
    where Text = '$(Country)')
    Order By SortOrder, QuestionOption

    The issue seems to be the way in which the ComboBox is created and databound within the DynamicRegistration code (I have source code via Enterprise Edition).  I can see how the binding is occurring, but I suspect the issue is that the Dynamic Registration variable ($(Country) in this case) is not yet populated when the Region combobox is databound to the generated SQL dataset.  Any suggestions or ideas on how to get the $(Country) variable to be available during the Region databind?  It seems like this is the root cause of my problem.

    Thanks in advance!

    Brian

    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    05-22-2007 07:32 AM
    Brian,

    Which field is rendered first, Country or Region? In this case I would think that the country field would have to appear before the region field but then it should work as you describe.

    -Chad
    Brian CornUser is Offline
    skipping stones
    skipping stones
    Posts:13
    Avatar

    --
    05-23-2007 05:50 PM

    Chad,

    The Country field is defined prior to the Region field, so I assume that this means the Country field is rendered before the Region.  Am I missing something here?  One thing to note is that both fields are visible upon initial page load; the Region field is not displayed via a dynamic event.  Again, the issue is that the Region field is not populated (databound) or set to the user's Region value upon loading the Profile page for a logged in user, regardless of the value of Country.

    Thanks!



    ---
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi