Load Active Tab Only

3 posts, 1 answers
  1. Joni
    Joni avatar
    12 posts
    Member since:
    Aug 2011

    Posted 06 Aug 2011 Link to this post

    I have been looking for a way to load a TabStrip such that only the active tab gets loaded. The whole TabStrip control should not load up front. What if you had 10 tabs, all with data controls?

    The demo's only have this example. This is not the behaviour I want.

    I want the tab to postback every time it is clicked (which the demo does not achieve. There, tabs only postback the 1st time they are clicked).

    I also don't like the solution of setting RenderSelectedPageOnly="true" on the MultiPage. When you click View Source, you only see the content of the front tab in the source, regardless of which tab you are on.

    I have had a go at solving this, but my solution has not worked. You can download my attempt from here.
    If you navigate away from a tab and then back to it, its content is missing (even without AJAX).  
    I've removed the Telerik DLL. I used version 2010.3.1215.35.

    Has anyone solved this problem? If so, I think it should be added to the demos, as I am sure it would be a very common requirement.
  2. Answer
    Peter avatar
    6637 posts

    Posted 11 Aug 2011 Link to this post

    Hello Joni,

    I tested your sample and pinpointed the problem to be caused by your setting the Visible property of the panels in the page views -

    case "tab1": panelPage2.Visible = false;
    case "tab2": panelPage1.Visible = false;

    If you comment those lines, you should get the expected functionality.

    Please, explain why you use those settings, since I am not sure what exactly you need to achieve with this.

    Best wishes,
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. Joni
    Joni avatar
    12 posts
    Member since:
    Aug 2011

    Posted 11 Aug 2011 Link to this post

    Thanks Peter.

    That was a silly error on my part. I have got it working with AJAX now.
    I think I will try for some more complicated scenarios.
    If I can get it working stably with data binding scenarios, I will make it available in the code library.

Back to Top