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

Load Active Tab Only

2 Answers 135 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Joni
Top achievements
Rank 1
Joni asked on 06 Aug 2011, 08:06 AM
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 Answers, 1 is accepted

Sort by
0
Accepted
Peter
Telerik team
answered on 11 Aug 2011, 05:40 AM
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,
Peter
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.

0
Joni
Top achievements
Rank 1
answered on 11 Aug 2011, 08:04 AM
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.

Cheers
Tags
TabStrip
Asked by
Joni
Top achievements
Rank 1
Answers by
Peter
Telerik team
Joni
Top achievements
Rank 1
Share this question
or