cannot do load on demand RadTabStrip that loads user control

2 posts, 0 answers
  1. EJ
    EJ avatar
    39 posts
    Member since:
    Jun 2012

    Posted 22 Jun 2010 Link to this post

    i keep getting this error

    Microsoft JScript runtime error: 'get_postBackElement().id' is null or not an object

    when I click on the second or third tab

    when I try to implement the load on demand radtabstrip demo

    i am using 2010.1 519 version of the controls

    the demo seems to say this should work - is this a bug?

    aspx page
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
                <telerik:AjaxSetting AjaxControlID="RadTabStrip1"
                        <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" /> 
                        <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" /> 
                <telerik:AjaxSetting AjaxControlID="RadMultiPage1"
                        <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
        <script type="text/javascript"
            function onTabSelecting(sender, args) { 
                var foo = args.get_tab(); 
                if (args.get_tab().get_pageViewID()) { 
                        <telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0" 
                            MultiPageID="RadMultiPage1" Orientation="HorizontalTop" 
                            OnTabClick="RadTabStrip1_TabClick" OnClientTabSelecting="onTabSelecting"
                        <telerik:RadMultiPage runat="server" ID="RadMultiPage1" SelectedIndex="0" 
                            Height="250px" Width="475px" BorderWidth="1" OnPageViewCreated="RadMultiPage1_PageViewCreated"

    code behind
     protected void Page_Load(object sender, EventArgs e) 
            if (!Page.IsPostBack) 
                AddTab(RadTabStrip1, "Tab1"); 
                AddPageView(RadMultiPage1, RadTabStrip1.FindTabByText("Tab1")); 
                AddTab(RadTabStrip1, "Tab2"); 
                //AddPageView(RadMultiPage1, RadTabStrip1.FindTabByText("Tab2")); 
                AddTab(RadTabStrip1, "Tab3"); 
                //AddPageView(RadMultiPage1, RadTabStrip1.FindTabByText("Tab3")); 
        private void AddTab(RadTabStrip tabstrip, string tabName) 
            RadTab tab = new RadTab(); 
            tab.Text = tabName
        private void AddPageView(RadMultiPage multipage, RadTab tab) 
            RadPageView pageView = new RadPageView(); 
            pageView.ID = tab.Text; 
            tab.PageViewID = pageView.ID; 
        protected void RadTabStrip1_TabClick(object sender, RadTabStripEventArgs e) 
            AddPageView(RadMultiPage1, e.Tab); 
            e.Tab.PageView.Selected = true
        protected void RadMultiPage1_PageViewCreated(object sender, RadMultiPageEventArgs e) 
            string userControlPath = "~/WebUserControl.ascx"
            Control userControl = Page.LoadControl(userControlPath); 
            if (e.PageView.ID == "Tab1") 
                userControl.ID = "UserControl1"
            else if (e.PageView.ID == "Tab2") 
                userControl.ID = "UserControl2"
            else if (e.PageView.ID == "Tab3") 
                userControl.ID = "UserControl3"
  2. Yana
    Yana avatar
    5043 posts

    Posted 25 Jun 2010 Link to this post

    Hi EJ,

    I've just answered to the support ticket regarding this issue. Here is my reply:

    I've tested the provided project but wasn't able to reproduce the described issue. Could you please send us the exact steps? Does the error occur every time you click a tab?

    Best regards,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top