This is a migrated thread and some comments may be shown as answers.

Load DropDown Box When Tab is Made Visible

2 Answers 43 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Coty
Top achievements
Rank 1
Coty asked on 30 Aug 2010, 09:13 PM

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 Answers, 1 is accepted

Sort by
0
Coty
Top achievements
Rank 1
answered on 30 Aug 2010, 09:42 PM
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.
0
Simon
Telerik team
answered on 31 Aug 2010, 01:26 PM
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
Tags
TabStrip
Asked by
Coty
Top achievements
Rank 1
Answers by
Coty
Top achievements
Rank 1
Simon
Telerik team
Share this question
or