RadTabStrip with RadMultiPage click events stop working

7 posts, 0 answers
  1. Lane Goolsby
    Lane Goolsby avatar
    2 posts
    Member since:
    Dec 2008

    Posted 14 Mar 2011 Link to this post

    I am working with the RadTabStrip and the RadMultiPage controls in a SharePoint web part and am running into a strange issue. The controls are loading properly and everything is working as expected, but after clicking a couple of tags the tab strip stops working. The click is being registered by the page because I can step into javascript debug statements, but none of the RAD code is executed. Below is my code but it pretty much matches the Load On Demand example.

    Web Form:





    <telerik:RadAjaxLoadingPanel runat="server" ID="radLoadingPanel" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <telerik:AjaxSetting AjaxControlID="radTabStrip">
                    <telerik:AjaxUpdatedControl ControlID="radTabStrip" />
                    <telerik:AjaxUpdatedControl ControlID="radCenterFrame" LoadingPanelID="radLoadingPanel" />
            <telerik:AjaxSetting AjaxControlID="radCenterFrame">
                    <telerik:AjaxUpdatedControl ControlID="radCenterFrame" LoadingPanelID="radLoadingPanel" />
    <script type="text/javascript">
        //function radTabStrip_OnClientSelecting(sender, args) {
        //    if (args.get_tab().get_pageViewID()) {
        //        alert(args.get_tab().get_test());
        //        args.get_tab().set_postBack(false);
        //    }
        <telerik:RadTabStrip ID="radTabStrip" runat="server" 
            SelectedIndex="0" MultiPageID="radCenterFrame" OnTabClick="radTabStrip_TabClick"
        <telerik:RadMultiPage ID="radCenterFrame" runat="server" SelectedIndex="0" OnPageViewCreated="radCenterFrame_PageViewCreated" />






    Code Behind:

            protected void Page_Load(object sender, EventArgs e)
                if (!Page.IsPostBack)
                    RadTab skillTab = new RadTab();
                    skillTab.Text = "Tab1";

                    RadTab certTab = new RadTab();
                    certTab.Text = "Tab2";

                    RadTab aspTab = new RadTab();
                    aspTab.Text = "Tab3";

                    RadTab tpTab = new RadTab();
                    tpTab.Text = "Tab4";

                    RadPageView pageView = new RadPageView();
                    pageView.ID = skillTab.Text;
                    skillTab.PageViewID = pageView.ID;

            protected void radCenterFrame_PageViewCreated(object sender, RadMultiPageEventArgs e)
                string page = e.PageView.ID;

                switch (page)
                    case "Tab1":
                        AddControl("~/_ControlTemplates/Proj/Tab1Control.ascx", e);
                    case "Tab2":
                        AddControl("~/_ControlTemplates/Proj/Tab2Control.ascx", e);
                    case "Tab3":
                        AddControl("~/_ControlTemplates/Proj/Tab3Control.ascx", e);
                    case "Tab4":
                        AddControl("~/_ControlTemplates/Proj/Tab4Control.ascx", e);

            protected void radTabStrip_TabClick(object sender, RadTabStripEventArgs e)
                e.Tab.PageView.Selected = true;
            private void AddPageView(RadTab tab)
                RadPageView pageView = new RadPageView();
                pageView.ID = tab.Text;
                tab.PageViewID = pageView.ID;
            private void AddControl(string Path, RadMultiPageEventArgs e)
                Control userControl = Page.LoadControl(Path);
                userControl.ID = e.PageView.ID + "_usercontrol";

  2. Cori
    Cori avatar
    562 posts
    Member since:
    Jul 2010

    Posted 16 Mar 2011 Link to this post

    Hello Lane,

    I noticed you don't have AutoPostback set to true on your RadTabStrip, thus the reason it doesn't raise the server-side events.

    I hope that helps.
  3. DevCraft R3 2016 release webinar banner
  4. Lane Goolsby
    Lane Goolsby avatar
    2 posts
    Member since:
    Dec 2008

    Posted 16 Mar 2011 Link to this post

    The server post backs for OnTabClick are firing just fine for the first couple of clicks. After clicking on three tabs, no matter what order I click (e.g. 1-2-1, 1-2-3, 1-3-3, 3-2-1, etc.), the events stop firing. AutoPostBack did not affect it.
  5. Kalina
    Kalina avatar
    918 posts

    Posted 21 Mar 2011 Link to this post

    Hi Lane Goolsby,

    SharePoint has some issues loading client scripts dynamically and I suppose that this causes the issue that you experience.
    Let me suggest you add the script references for RadTabStrip control manually through the ScriptManager  - as described in this help article.

    the Telerik team
  6. Patrik Johansson
    Patrik Johansson avatar
    270 posts
    Member since:
    May 2010

    Posted 29 Mar 2011 Link to this post

    Note sure if it is relevant but setting the NavigationURL for a Tab will prevent many events and override the AutoPostback setting, we had the same problem ourselves recently.
  7. Sebastian
    Sebastian avatar
    10 posts
    Member since:
    Sep 2011

    Posted 01 Dec 2011 Link to this post

    Was a solution found to this?

    I have similar problem where TabClick event does not get fired after few clicks.

  8. Dimitar Terziev
    Dimitar Terziev avatar
    1266 posts

    Posted 06 Dec 2011 Link to this post

    Hello Sebastian,

    Could you clarify whether you are using the RadTabStrip in SharePoint or not? In case it's used in SharePoint, have you tried to register the script manually as my colleague Kalina had suggested?

    All the best,
    Dimitar Terziev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top
DevCraft R3 2016 release webinar banner