Load DropDown Box When Tab is Made Visible

3 posts, 0 answers
  1. Coty
    Coty avatar
    90 posts
    Member since:
    Aug 2006

    Posted 30 Aug 2010 Link to this post


    I am using a RadTabStrip, one of the dropdown boxes is loaded depending on a previous tab's controls (depending on what the user selects on a previous tab)

    I have it set up with a TabStrip, MultiPageView and PageViews.

    I used the RadTabStrip Unload event to figure out which tab is currently being viewed and load the dropdown box as follows:
    Protected Sub RadTabStrip1_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadTabStrip1.Unload
      
            Select Case RadTabStrip1.SelectedTab.Text
      
                Case "Case Info"
                Case "Client Info"
                Case "Experts"
                Case "Letter Details"
      
                    'get office phone numbers
                    Dim db As New RFIDataContext
      
                    Dim q = (From o In db.Offices _
                             Where o.OfficeId = rcbOffice.SelectedValue _
                            Select o.Fax, o.Fax2, o.Fax3).First
      
                    With q
      
                        If Not IsNothing(q.Fax) Then
                            If q.Fax.Trim <> String.Empty Then
                                ddlFaxes.Items.Add(FormatPhoneDots(q.Fax))
                            End If
                        End If
                        If Not IsNothing(q.Fax2) Then
                            If q.Fax2.Trim <> String.Empty Then
                                ddlFaxes.Items.Add(FormatPhoneDots(q.Fax2))
                            End If
                        End If
                        If Not IsNothing(q.Fax3) Then
                            If q.Fax3.Trim <> String.Empty Then
                                ddlFaxes.Items.Add(FormatPhoneDots(q.Fax3))
                            End If
                        End If
      
                    End With
      
                Case "Sign & Save"
      
      
      
            End Select

    The problem is that the dropdown box is still empty.  The event fires and the data is pulled and loaded but not updated on the page.  (I confirmed through debugging that everything works above just nothing is visually loaded)

    What am I missing?

    Coty
  2. Coty
    Coty avatar
    90 posts
    Member since:
    Aug 2006

    Posted 30 Aug 2010 Link to this post

    Nevermind, I just did it a different way.  I guess the Unload event doesn't support server-side code updates?

    I just used the tabclick event instead and looked at the selectedIndex which works.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 31 Aug 2010 Link to this post

    Hi Coty,

    Yes, changes to Page's controls are not rendered in the Unload phase as it is the last phase in the page life cycle. Controls render in the Render phase is happens earlier than Unload.

    Sincerely yours,
    Simon
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top