Hello,
On the demo site I found your client side example how to switch tabs on a button click. This example is working as expected as long as I am not using User Controls.
On my page ("default.aspx") I do have a TabStrip with 2 tabs, and a Multipage with 2 PageViews.
When I trigger an event on details.aspx to switch tab and pageview everything works as expected (according to your advertised example on the demo pages).
But as I said, the pageviews are actually loading User Controls and so the Events are triggered from the User Control and that is causing the problem.
$find("rtsTabs") always returns a proper object. But it never finds the Multipages. $find("rmpMultipages") or $find("<%= rmpMultipages.ClientID %>") always returns null.
The Button Click in the User Control is doing this (RowCommandEvent within a Gridview):
I also tried to create my own event which is triggered from the UserControl and executed from details.aspx but the result remains the same: I can switch the tabs but I cant switch the pageview.
On the demo site I found your client side example how to switch tabs on a button click. This example is working as expected as long as I am not using User Controls.
On my page ("default.aspx") I do have a TabStrip with 2 tabs, and a Multipage with 2 PageViews.
<telerik:RadTabStrip ID="rtsTabs" runat="server" SelectedIndex="0" Skin="WebBlue" Orientation="HorizontalTop" |
MultiPageID="rmpMultipages" OnClientTabSelecting="rtsTabs_TabSelecting" OnTabClick="rtsTabs_TabClick"> |
<Tabs> |
<telerik:RadTab Text="Employee" runat="server" PageViewID="rpvEmployee" /> |
<telerik:RadTab Text="Manager" runat="server" PageViewID="rpvManager" TabIndex="1" /> |
</Tabs> |
</telerik:RadTabStrip> |
<telerik:RadAjaxLoadingPanel runat="server" ID="LoadingPanel1"> |
<asp:Image runat="server" ID="LoadingImage1" SkinID="AjaxBigBlue" /> |
</telerik:RadAjaxLoadingPanel> |
<telerik:RadMultiPage ID="rmpMultipages" runat="server" SelectedIndex="0"> |
<telerik:RadPageView ID="rpvEmployee" runat="server" Selected="true" TabIndex="0" CssClass="ContentForm"> |
<ucEmployee:UserControl ID="ucEmployeeForm" runat="server" /> |
</telerik:RadPageView> |
<telerik:RadPageView ID="rpvManager" runat="server" TabIndex="1" CssClass="ContentForm"> |
<ucManager:UserControl ID="ucManagerForm" runat="server" /> |
</telerik:RadPageView> |
</telerik:RadMultiPage> |
When I trigger an event on details.aspx to switch tab and pageview everything works as expected (according to your advertised example on the demo pages).
function SetTab(sTabText) |
{ |
var tab = $find("rtsTabs").findTabByText(sTabText); |
if (tab != null) |
{ |
tab.set_selected(true); |
var pageView = $find("<%= rmpMultipages.ClientID %>"); |
var pageViewIndex = 3; |
pageView.get_pageViews().getPageView(pageViewIndex).set_selected(true); |
} |
} |
But as I said, the pageviews are actually loading User Controls and so the Events are triggered from the User Control and that is causing the problem.
$find("rtsTabs") always returns a proper object. But it never finds the Multipages. $find("rmpMultipages") or $find("<%= rmpMultipages.ClientID %>") always returns null.
The Button Click in the User Control is doing this (RowCommandEvent within a Gridview):
if (e.CommandName == "Aufgabe") |
{ |
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "SetTab('Employee');", true); |
} |
I also tried to create my own event which is triggered from the UserControl and executed from details.aspx but the result remains the same: I can switch the tabs but I cant switch the pageview.