RadTabStrip and RadMultiPage dynamic reload

3 posts, 0 answers
  1. KO
    KO avatar
    17 posts
    Member since:
    Jun 2012

    Posted 06 Jun 2012 Link to this post

    What I am trying to accomplish is writing a javascript function that when called from the click of a page element does the tabbing and changing of the of the RadTabStrip and RadMultiPage, with the option of passing a query string. However, I would like the option of passing in another boolean parameter that will notify the "sending" tab the next time it is clicked, it needs to reload its content. I have had some success in changing the RadTabStrip and RadMultiPage from my script, as well as the using the query string by changing the ContentUrl of the "target" PageView, but have been experiencing a lot of trouble in figuring out how to get the "sending" tab to reload its PageView.

    Current JS file:
    function ToolClick(sender, args, queryString, targetPageIndex, refreshSendingPage) {
        var revertContentUrl = false;
     
        // get the multi page ID, and tab strip ID, from the SiteAuthenticated script
        var multiPageID = top.GetMultiPageID();
        var multiPage = top.$find(multiPageID);
        var tabStripID = top.GetTabStripID();
        var tabStrip = top.$find(tabStripID);
     
        // get the target page view, and get its pre Tab Content URL for reverting after selection
        var multiPageViews = multiPage.get_pageViews();
        var targetPageView = multiPageViews._data[targetPageIndex];
        var preTabPageContentUrl = targetPageView.get_contentUrl();
     
        // change the page View's ContentUrl if the queryString was supplied
        if (queryString != null && queryString.length > 0) {
            targetPageView.set_contentUrl(preTabPageContentUrl + queryString);
            revertContentUrl = true;
        }
     
        // if refreshSendingPage is true then set the tab we are leaving to PostBack on next click
        if (refreshSendingPage) {
            var currentTab = tabStrip.get_selectedTab();
            currentTab.set_value("reload");
        }
     
        // do the tab change
        tabStrip.get_tabs()._array[targetPageIndex].select();   
     
        // if we changed the contentUrl for the query then change it back
        //if (revertContentUrl) {
        //    targetPageView.set_contentUrl(preTabPageContentUrl);
        //}
    }
     
    // to be used in determining if the tab needs to postBack or not
    function TabStrip_OnTabSelecting(sender, args) {
        var selectingTab = args.get_tab();
        // check tab values for post back
        if (selectingTab.get_value() == "reload") {
            // the tab is set to post back so unload and reload the related pageView
        }
    }


    Thank you in advance for assistance.
  2. KO
    KO avatar
    17 posts
    Member since:
    Jun 2012

    Posted 07 Jun 2012 Link to this post

    I was able to solve this
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Anton
    Anton avatar
    3 posts
    Member since:
    Nov 2008

    Posted 10 Aug 2012 Link to this post

    Hi KO

    Can you please share the solution on how you solved this?
    I am struggling with the same thing .

    Thank you very much .

Back to Top