Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > TabStrip > RadPageView remains hidden when tab has space in its name

Not answered RadPageView remains hidden when tab has space in its name

Feed from this thread
  • Jeff avatar

    Posted on Oct 28, 2011 (permalink)


    I have a RadTabStrip paired with a RadMultiPage.  The RadPageViews are created dynamically in the OnDataBinding event of the RadTabStrip.  Everything is working fine except when the tabs have spaces (or other special characters) in their titles.  When I click on those particular tabs, I examined the rendered html for the RadMultiPage -- what happens is that the "class=rmpHiddenView" is not removed from the div representing the page view (at this point the other tabs have this CSS class applied plus the inline style "display:none").  When I click on the tabs without spaces in their names, everything works -- that class is removed (and the inline style "display:none" is also removed).

    This is the markup:
    <telrik:RadTabStrip runat="server" ID="uiTabs" DataSource="<%#this.RetrieveSubpageData()%>"
        OnDataBinding="uiTabs_OnDataBinding" MultiPageID="uiPages"
        SelectedIndex="0" DataTextField="PageTitle">
    </telrik:RadTabStrip>
    <telrik:RadMultiPage runat="server" ID="uiPages" SelectedIndex="0">
    </telrik:RadMultiPage>

    Here is what the rendered html looks like after I click on the third tab:

    Note that in this picture, I'm URL encoding the id of the RADPageView when I set it in my codebehind, but I get the same result when I don't URL encode it.

    Reply

  • Jeff avatar

    Posted on Oct 30, 2011 (permalink)

    Further information:

    Even if I substitute my own script to "select" the page, I get the same results (it works except for tabs that have spaces in their title).  Suggesting, perhaps that the problem is with the RadMultiPage "set_selected" script itself, perhaps?

    Here is the code I used for selection, to be specific:
    <script type="text/javascript">
        function selectPageView(sender, args) {
            var pageView = $find("<%= uiPages.ClientID %>");
            var selectedTab = args.get_tab();
            var pageViewIndex = selectedTab.get_index();
     
            var selectedPageView = pageView.get_pageViews().getPageView(pageViewIndex);
            selectedPageView.set_selected(true);
            selectedPageView.show();
     
            return false;
        }
    </script>
    <telrik:RadTabStrip runat="server" ID="uiTabs" DataSource="<%#this.RetrieveSubpageData()%>"
        OnDataBinding="uiTabs_OnDataBinding" OnClientTabSelected="selectPageView"
        SelectedIndex="0" DataTextField="PageTitle" DataValueField="PageUrl">
    </telrik:RadTabStrip>

    Reply

  • Dimitar Terziev Dimitar Terziev admin's avatar

    Posted on Nov 2, 2011 (permalink)

    Hi Jeff,

    Could you specify the exact version of the controls that you are using? Also please provide the server-side code that you are using to add pageview so I could try to reproduce the problem locally,

    Greetings,
    Dimitar Terziev
    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

    Reply

  • Jeff avatar

    Posted on Nov 3, 2011 (permalink)

    No, it would be too complicated to try to run it locally.

    I found that the problem has something to do with how I was assigning the IDs.  Once I removed the codebehind that was setting the IDs on the tabs and pages, it worked.

    Reply

  • John avatar

    Posted on Jan 17, 2012 (permalink)

    Had exactly the same issue when upgrading to Telerik.Web.UI v.2011.3.1305.40
    This code worked on the older version of Telerik;
    tabName contained spaces for some tabs and these wouldn't display their contents
    RadTab tab = new RadTab();
    tab.Text = tabName;
    reportCategoryTabStrip.Tabs.Add(tab);
       
    RadPageView pageView = new RadPageView();
    pageView.ID = tabName;
    reportCategoryMultiPage.PageViews.Add(pageView);
    using below corrected the display issue;
       
    RadTab tab = new RadTab();
    tab.Text = tabName;
    reportCategoryTabStrip.Tabs.Add(tab);
    RadPageView pageView = new RadPageView();
    pageView.ID = tabName.Replace(" ", "");
    reportCategoryMultiPage.PageViews.Add(pageView);

    Reply

  • Dimitar Terziev Dimitar Terziev admin's avatar

    Posted on Jan 20, 2012 (permalink)

    Hi John,

    I've made a very simple page trying to reproduce the experienced behavior, but to no avail. The version I'm using is 2011.3.1305. Pleas find it attached so you could test it on your side.

    Kind regards,
    Dimitar Terziev
    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
    Attached files

    Reply

  • Kevin avatar

    Posted on Feb 3, 2012 (permalink)

    Just to add...

    I downloaded Telerik controls yesterday to try them out and I found the exact same thing.

    It took me quite a long time to figure out this was the problem.  For testing/reproduction purposes, I removed the spaces from any tab names (Changed "Tab 1" to "Tab1") and it worked perfectly. Thats how I figured out it was the spaces causing the problems.  (If I add a space to a previously working tab name, it then fails as well)

    Thankfully someone posted a work around.

    Kevin

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > TabStrip > RadPageView remains hidden when tab has space in its name
Related resources for "RadPageView remains hidden when tab has space in its name"

ASP.NET TabStrip Features  |   Documentation Demos   |  Telerik TV  |  Self-Paced Trainer  |   Step-by-step Tutorial  ]