TabTemplate with embeded Image doesn't work

7 posts, 0 answers
  1. Doug
    Doug avatar
    7 posts
    Member since:
    Feb 2009

    Posted 05 May 2009 Link to this post

    If you create a global TabTemplate (need to have a close button) any images that are assigned to the tab don't show up unless the tab is hovered over.  The other issue is  the icon (image) shows up in the far right of the tab, not left of the text as expected and documented. 

     

     

     
      <telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0"   
            Skin="Vista">  
             <TabTemplate> 
                <%# DataBinder.Eval(Container, "Text") %> 
              </TabTemplate> 
             <Tabs> 
                <telerik:RadTab runat="server" Text="Demand" ImageUrl="~/Images/icons/Demand.gif">  
                </telerik:RadTab> 
                <telerik:RadTab runat="server" Text="Drafts"  ImageUrl="~/Images/icons/Drafts.gif">  
                </telerik:RadTab> 
            </Tabs> 
        </telerik:RadTabStrip> 

    Any idea on how to make the Image show up in the proper place at the proper time (load)?

  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 05 May 2009 Link to this post

    Hi Doug,

    Unfortunately you have discovered a bug in RadTabStrip. The ImageUrl should be rendered initially when TabTemplate is specified. Now it is rendered at the client side when the user selects or hovers the tab. I have logged this bug and we will release a hotfix soon. I will update this forum thread once ready.

    Regards,
    Albert
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 06 May 2009 Link to this post

    Hi Doug,

    I just wanted to let you know that we fixex this problem and the hotfix will be available tomorrow with the latest internal build. I have updated your telerik points with regards to this bug report. Please open a support ticket should you need the hotfix earlier.

    Regards,
    Albert
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  4. Doug
    Doug avatar
    7 posts
    Member since:
    Feb 2009

    Posted 01 Jun 2009 Link to this post

    Just thought I would let you know that I never got the build with the fix in it.  Not sure what is going on.
  5. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 02 Jun 2009 Link to this post

    Hello Doug,

    The fix is incorporated in the SP2 release. I recommend you download it.

    Best wishes,
    Albert
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Doug
    Doug avatar
    7 posts
    Member since:
    Feb 2009

    Posted 10 Jun 2009 Link to this post

    There appears to be another issue with this now.  If you try to add a tab dynamically the text doesn't show up when added.

     Dim rootTab As RadTab = New RadTab  
     rootTab.Text = _TabText   
     rootTab.Value = TableName 
     rootTab.Selected = True 
     rootTab.ImageUrl = GetImageURL("Icons/" & CTableManager.GetTableIcon(TableName))  
     
     RadTabStrip1.Tabs.Add(rootTab)  
     

    After the tabstrib has been reloaded on a postback after the tab is added it then shows up properly.

    Right now my work around is instead of adding the tab directly, I add it into the DB record that contains the tab configuration (to maintain tabs across sessions) and then reload the entire tab strip everytime a new tab is added by the user.  It isn't pretty, but I have it working for now.  But it would be nice if the Text property of the RadTab is properly applied when using a tab template with dynamic generation.

    Thanks,

    Doug

    Edit:  I did discover that calling RadTabStrip1.DataBind() after the tab is added seems to refresh the tabstrip enough to show the properly configured tab.
  7. Daniel
    Daniel avatar
    1 posts
    Member since:
    Apr 2008

    Posted 30 Apr 2010 Link to this post

    I have a similar problem. I use  user control inside a template. The user control has texts and images in it but
    the rad tab shows nothing. I have also called Databind explicily. The following is my code

    telerik:RadTab PageViewID="RadPageViewDocuments">

        <TabTemplate>                                                   

           <uc:DocumentTab runat="server" Text="<%$ Resources:TextStrings, DocumentWorkspace %>"

           ToolTip="<%$ Resources:TextStrings, DocumentWorkspace %>" ID="UserControlDocumentTab"

           NumberOfItems="2" MaximumNumber="99"  />

    </TabTemplate>

    </telerik:RadTab

Back to Top