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

Dynamic loading Tab/PageView

2 Answers 165 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Marty
Top achievements
Rank 1
Marty asked on 07 May 2008, 07:46 PM
In response to user selection I want to add tabs dynamically and corresponding pageview.

I have this working, but the tab doesn't seem to be linked to the PageView (ie: I click on the tab and the pageview doesn't change).  How do I link the two of them.

The tabs and pagview are created through an ajax call.

2 Answers, 1 is accepted

Sort by
0
Marty
Top achievements
Rank 1
answered on 07 May 2008, 08:22 PM
Actually, I added some tabs in the page.  They seem to work until I add one dynamically through the ajax call.  After that nothing works.  It's like all the tabs are disabled.

Code Snips:

<

telerik:RadPane id="MainPane" runat="server" >

<telerik:RadAjaxPanel ID="MainPaneAjaxPanel" runat="server" Height="100%" Width="100%">

<telerik:RadTabStrip ID="BatchTabs" runat="server" OnClientTabSelected="TabSelected">

<Tabs>

<telerik:RadTab Text="Tab1" Value="Tab1" />

<telerik:RadTab Text="Tab1" Value="Tab1" />

<telerik:RadTab Text="Tab1" Value="Tab1" />

<telerik:RadTab Text="Tab1" Value="Tab1" />

</Tabs>

</telerik:RadTabStrip>

<telerik:RadMultiPage ID="BatchTabsMP" runat="server">

</telerik:RadMultiPage>

MainPane

<asp:Label ID="lbStatus" Text="" runat="server" />

</telerik:RadAjaxPanel>

</telerik:RadPane> 


protected

void AjaxManagerRequest(object sender, AjaxRequestEventArgs e)

{

lbStatus.Text = e.Argument;

RadTab newTab = new RadTab(e.Argument);

BatchTabs.Tabs.Add(newTab);

0
Marty
Top achievements
Rank 1
answered on 10 May 2008, 12:58 PM
I figured it out.  I keep forgetting to add all the controls to the ajax manager.
Tags
TabStrip
Asked by
Marty
Top achievements
Rank 1
Answers by
Marty
Top achievements
Rank 1
Share this question
or