Tabs Not Changing and Ripping out Entire Line of Tabs

3 posts, 0 answers
  1. Lonnie
    Lonnie avatar
    7 posts
    Member since:
    Oct 2011

    Posted 15 Dec 2011 Link to this post

    I am using the tabstrip in a control to switch between multiple pages. All of the pages except for 2 of them work fine. The 2 that don't work either give the following error or rip out the second line of tabs. I don't know what the problem is.

    The snippet of code referenced in this error is the only code behind dealing with the tabstrip. On the aspx page I register the control and then reference it.


    Besides that error it should display this.

    But once I click on the Initial DD (Inv) or Ratings after clicking back from the error it looks like this. (Ripped out the middle line of tabs)

    Here is the code for the control containing the TabStrip. The property at the bottom is what the pages use to set the select tab.
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load       
    If
    Not Page.IsPostBack Then
     
                Dim tabSummary As New RadTab()
                tabSummary.Text = "Summary"
                tabSummary.NavigateUrl = "~/Funds/fundSummary.aspx?feederFundID=" & Request.QueryString("feederFundID")
                tabSummary.Enabled = True
                rtsFundTopNav.Tabs.Add(tabSummary)
     
     
                Dim tabProfile As New RadTab()
                tabProfile.Text = "Profile"
                tabProfile.NavigateUrl = "~/Funds/fundProfile.aspx?feederFundID=" & Request.QueryString("feederFundID")
                rtsFundTopNav.Tabs.Add(tabProfile)
     
                Dim tabPerformance As New RadTab()
                tabPerformance.Text = "Performance"
                tabPerformance.NavigateUrl = "~/Funds/fundPerformance.aspx?feederFundID=" & Request.QueryString("feederFundID")
                tabPerformance.Enabled = False
                rtsFundTopNav.Tabs.Add(tabPerformance)
     
                Dim tabRisk As New RadTab()
                tabRisk.Text = "Risk"
                tabRisk.NavigateUrl = "~/Funds/fundRisk.aspx?feederFundID=" & Request.QueryString("feederFundID")
                rtsFundTopNav.Tabs.Add(tabRisk)
     
                Dim tabPortfolio As New RadTab()
                tabPortfolio.Text = "Portfolio"
                tabPortfolio.NavigateUrl = "~/Funds/fundPortfolio.aspx?feederFundID=" & Request.QueryString("feederFundID")
                tabPortfolio.Enabled = False
                rtsFundTopNav.Tabs.Add(tabPortfolio)
     
                Dim tabExposure As New RadTab()
                tabExposure.Text = "Exposure"
                tabExposure.NavigateUrl = "~/Funds/fundExposure.aspx?feederFundID=" & Request.QueryString("feederFundID")
                tabExposure.Enabled = False
                tabExposure.IsBreak = True
                rtsFundTopNav.Tabs.Add(tabExposure)
     
                Dim tabFundReports As New RadTab()
                tabFundReports.Text = "Fund Reports"
                tabFundReports.NavigateUrl = "~/Funds/fundReports.aspx?feederFundID=" & Request.QueryString("feederFundID")
                rtsFundTopNav.Tabs.Add(tabFundReports)
     
                Dim tabFundDocuments As New RadTab()
                tabFundDocuments.Text = "Fund Documents"
                tabFundDocuments.NavigateUrl = "~/Funds/fundDocuments.aspx?feederFundID=" & Request.QueryString("feederFundID")
                rtsFundTopNav.Tabs.Add(tabFundDocuments)
     
                Dim tabContacts As New RadTab()
                tabContacts.Text = "Contacts"
                tabContacts.NavigateUrl = "~/Funds/fundContacts.aspx?feederFundID=" & Request.QueryString("feederFundID")
                rtsFundTopNav.Tabs.Add(tabContacts)
     
                Dim tabCommunications As New RadTab()
                tabCommunications.Text = "Calls and Meetings"
                tabCommunications.NavigateUrl = "~/Funds/fundCommunications.aspx?feederFundID=" & Request.QueryString("feederFundID")
                rtsFundTopNav.Tabs.Add(tabCommunications)
     
                Dim tabTasks As New RadTab()
                tabTasks.Text = "Tasks"
                tabTasks.NavigateUrl = "~/Funds/fundTasks.aspx?feederFundID=" & Request.QueryString("feederFundID")
                rtsFundTopNav.Tabs.Add(tabTasks)
     
                Dim tabHistory As New RadTab()
                tabHistory.Text = "History"
                tabHistory.NavigateUrl = "~/Funds/fundHistory.aspx?feederFundID=" & Request.QueryString("feederFundID")
                rtsFundTopNav.Tabs.Add(tabHistory)
     
                Dim tabAccounting As New RadTab()
                tabAccounting.Text = "Accounting"
                tabAccounting.NavigateUrl = "~/Funds/fundAccounting.aspx?feederFundID=" & Request.QueryString("feederFundID")
                tabAccounting.IsBreak = True
                rtsFundTopNav.Tabs.Add(tabAccounting)
                '--------------------------------------------------
                'Tabs in Question
                '--------------------------------------------------
                Dim tabInitialIDD As New RadTab()
                tabInitialIDD.Text = "Initial DD (Inv)"
                tabInitialIDD.NavigateUrl = "~/Funds/MasterFunds/DueDiligence/initialIDD.aspx?masterFundID=" & masterFundID
                rtsFundTopNav.Tabs.Add(tabInitialIDD)
     
                Dim tabRatings As New RadTab()
                tabRatings.Text = "Ratings"
                tabRatings.NavigateUrl = "~/Funds/MasterFunds/DueDiligence/ratingSummary.aspx?masterFundID=" & masterFundID
                tabRatings.Enabled = True
                rtsFundTopNav.Tabs.Add(tabRatings)
                '---------------------------------------------------
                Dim tabAFSReviews As New RadTab()
                tabAFSReviews.Text = "AFS Reviews"
                tabAFSReviews.NavigateUrl = "~/Funds/DueDiligence/afsReviews.aspx?feederFundID=" & Request.QueryString("feederFundID")
                tabAFSReviews.Enabled = False
                rtsFundTopNav.Tabs.Add(tabAFSReviews)
     
                Dim tabInitialODD As New RadTab()
                tabInitialODD.Text = "Initial DD (Ops)"
                tabInitialODD.NavigateUrl = "~/Funds/DueDiligence/initialODD.aspx?feederFundID=" & Request.QueryString("feederFundID")
                If fundType <> "Private Equity" And fundType <> "Hedge Fund" Then
                    tabInitialODD.Enabled = False
                End If
                rtsFundTopNav.Tabs.Add(tabInitialODD)
     
                Dim tabOngoingDD As New RadTab()
                tabOngoingDD.Text = "Ongoing DD (Ops)"
                tabOngoingDD.NavigateUrl = "~/Funds/DueDiligence/ongoingODD.aspx?feederFundID=" & Request.QueryString("feederFundID")
                rtsFundTopNav.Tabs.Add(tabOngoingDD)
     
     
                If IsNumeric(Request.QueryString("selectedTab")) Then
                    rtsFundTopNav.SelectedIndex = Request.QueryString("selectedTab")
                Else
                    rtsFundTopNav.SelectedIndex = 0
                End If
     
            End If
        Else
            Response.Clear()
            Response.Redirect("../default.aspx")
            Response.End()
        End If
     
    End Sub
     
    Public WriteOnly Property activeTab() As String
        Set(ByVal value As String)
            rtsFundTopNav.Tabs.FindTabByText(value).Selected = True
        End Set
    End Property

    Here is the markup.
    <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
    <div class="announcementHeader">
        <asp:Label runat="server" ID="lblFundLegalName" />
    </div>
    <telerik:RadTabStrip ID="rtsFundTopNav" runat="server" />

    Any help would be greatly appreciated.

    Thanks,
    Lonnie
  2. Lonnie
    Lonnie avatar
    7 posts
    Member since:
    Oct 2011

    Posted 15 Dec 2011 Link to this post

    It should also be noted I tried this from the page that references the control and it gave me a null reference error.

    Dim rtsTopNav As RadTabStrip
            rtsTopNav = topNav1.FindControl("rtsFundTopNav")
            'rtsTopNav.Tabs.FindTabByText("Initial DD (Inv)").Selected = True
     
            Dim radTab As RadTab
            radTab = rtsTopNav.Tabs.FindTabByText("Initial DD (Inv)")
            radTab.Selected = True
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 19 Dec 2011 Link to this post

    Hi Lonnie,

    I also noticed that we received a support ticket with the same issue that you describe here, however, I would suggest that you send us a simplified runnable project in the ticket with id 493865, so that we could inspect it locally and come back to you with a suitable solution.

    Greetings,
    Kate
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top