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

IE problem with Dynamic Tab/Pageview with UserControls

2 Answers 107 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Axel
Top achievements
Rank 2
Axel asked on 11 Oct 2009, 11:59 PM
Hi

I have a page with tabs and pageviews and all is OK. All pageviews are rendered dynamically and have userControls added to them.
One of these Pageviews has another Tab based page (UserControl), and if I apply the same dynamic rendering method there, a funny thing happens. All is OK in Firefox, but in IE 8 my pageviews, or better yet, the usercontrol I'm adding to them, show upp all over the place.

The parent page with the tabs is a customer page, and one of the tabs is "customer addresses". When that tab is clicked my pageview with customer shipping,- home,- billing adresses etc. are displayed, one in each tab. In Firefox all is OK but in IE 8 the first with "home address" is ok, but the next Tab has both "home address" and "billing address". And the even more peculiar thing is that my address ageview shows up in my parent page tabs, - almost all of them (except if my first address-tab is selected, then all is ok).

The code I'm using to add the tabs/Pageviews/ and usercontrols looks like this...

private void PopulateAddressTabs()  
        {  
            string tmpTabName = "";  
              
 
            AddressMultiPage.PageViews.Clear();  
            
            if (partyID > 0)  
            {  
                var db = new PartyDataContext();  
 
                var addresses = db.PartyAddressesGet(partyID);  
 
                foreach (var address in addresses)  
                {  
                    if (address.AddressType != null)  
                        tmpTabName = (string)GetLocalResourceObject("AddressType" + address.AddressType.id.ToString());  
                    else  
                        tmpTabName = (string)GetLocalResourceObject("AddressType0");  
 
                    AddTab(tmpTabName, "EditAddress" + address.id.ToString(), address.id, false);  
                }  
            }  
 
            AddTab((string)GetLocalResourceObject("NewAddress"), "NewAddress", -1, true);  
 
 
        }  
        private void AddTab(string tabName, string tabID, int addrID, bool isInsert)  
        {  
            RadTab tab = new RadTab();  
            tab.Text = tabName;  
            AddressTabStrip.Tabs.Add(tab);  
 
            PartyAddress userControl = (PartyAddress)LoadControl("~/Party/UserControls/PartyAddress.ascx");  
            userControl.AddressID = addrID;  
            userControl.IsInsert = isInsert;  
            userControl.PartyID = partyID;  
            userControl.ID = tabID + "_userControl";  
 
            RadPageView pageView = new RadPageView();  
            pageView.ID = tabID;  
            pageView.Controls.Add(userControl);  
            AddressMultiPage.PageViews.Add(pageView);  
 
        }  
 


Thanks for any help
Axel

2 Answers, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 14 Oct 2009, 12:35 PM
Hello Axel,

I think it will be best if you can open a support ticket and send us a simple running project (incl. CSS, images, skins, DB backup if needed and so on) demonstrating the problem (and step-by-step instructions on doing so). In that way we can reproduce and pinpoint the problems you're facing on our side, understand the logic of your application and provide a solution.

Thanks,
Paul
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Axel
Top achievements
Rank 2
answered on 15 Oct 2009, 05:37 PM
Hi Paul,

After ignoring this for a while and just coding on, I found out what the problem was.
Just to refresh and sum up the problem.

"I have one usercontrol with RadTap embedded within a Multipage View i.e. a RadTap page within a RadTap page. Pageview content from my sub page (usercontrol RadTap page within another radtap page) started appearing in all tabs after being displayed once, and only in IE 8. Firefix was fine.

After some heavy trial and error html attempts I found what solved the problem. I had wrapped my subpage Radtap within a <li> element, and when I removed it, everyting whent back to normal. Not sure why, but no worries, it worked.

This was my code that produced the problem (with the <li> </li> markup).

<asp:Panel ID="UserControlContainer" CssClass="UserControlContainer  TabStrip" runat="server">  
<li> 
    <h3><%= GetLocalResourceObject("PageTitle").ToString() %></h3>  
    <telerik:RadTabStrip ID="AddressTabStrip" runat="server" SelectedIndex="0"   
        MultiPageID="AddressMultiPage" Skin="Default">  
    </telerik:RadTabStrip> 
    <telerik:RadMultiPage ID="AddressMultiPage" runat="server">  
    </telerik:RadMultiPage>   
</li> 
</asp:Panel>     
Tags
TabStrip
Asked by
Axel
Top achievements
Rank 2
Answers by
Paul
Telerik team
Axel
Top achievements
Rank 2
Share this question
or