Scroll buttons not visible

8 posts, 1 answers
  1. Marek Witczak
    Marek Witczak avatar
    10 posts
    Member since:
    Oct 2009

    Posted 16 Nov 2009 Link to this post

    Hello,
    I create RadTabStrip programatically and I can't make scroll buttons visible. Am I missing something?

    here is my c#

            protected void Page_Load(object sender, EventArgs e)  
            {  
                RadTabStrip strip = new RadTabStrip();  
                strip.ScrollChildren = true;  
                strip.ScrollButtonsPosition = TabStripScrollButtonsPosition.Left;  
                strip.Width = 200;  
                for (int i = 0; i < 15; i++)  
                {  
                    RadTab tabPanel = new RadTab();  
                    tabPanel.Text = String.Format("{0}""Test");  
                    strip.Tabs.Add(tabPanel);  
                }  
                this.Controls.Add(strip);  
            } 

    and aspx
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TabStripTest._Default" %> 
     
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
     
    <html xmlns="http://www.w3.org/1999/xhtml" > 
    <head runat="server">  
        <title></title>  
    </head> 
    <body> 
        <form id="form1" runat="server">  
        <div> 
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
            </telerik:RadScriptManager> 
        </div> 
        </form> 
    </body> 
    </html> 
     

    Any ideas?

    Regards
    Marek Witczak
  2. Answer
    Paul
    Admin
    Paul avatar
    4281 posts

    Posted 16 Nov 2009 Link to this post

    Hello Marek Witczak,

    Here's your modified code snippet that works as expected.

    protected void Page_Load(object sender, EventArgs e)
       {
           RadTabStrip strip = new RadTabStrip();
           strip.ScrollChildren = true;
           strip.ScrollButtonsPosition = TabStripScrollButtonsPosition.Left;
           strip.Width = Unit.Pixel(200);
           for (int i = 0; i < 15; i++)
           {
               RadTab tabPanel = new RadTab();
               tabPanel.Text = String.Format("{0}", "Test");
               strip.Tabs.Add(tabPanel);
           }
           form1.Controls.Add(strip); 
       }


    Regards,
    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.
  3. Marek Witczak
    Marek Witczak avatar
    10 posts
    Member since:
    Oct 2009

    Posted 16 Nov 2009 Link to this post

    Dear Paul,
    The solution worked very well, however I'd like to know why does it work?
    What difference did it make? Why it doesn't work with this.Controls?
    I have a case when I need to use TabStrip within custom server control and in that case the solution won't work.
  4. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 16 Nov 2009 Link to this post

    Hello Marek Witczak,

    this in your case stands for the page itself (as it is used in the Page_Load event), but RadTabstrip is a server control and should be placed in a form tag.

    Greetings,
    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.
  5. Marek Witczak
    Marek Witczak avatar
    10 posts
    Member since:
    Oct 2009

    Posted 19 Nov 2009 Link to this post

    OK, let me describe my scenario in some more details.
    I have a custom server control. The control sometimes triggers modal popup window which contains TabStrip control. In this case buttons don't show up even though my server control is added in markup code. That's why I want to understand why scroll buttons sometimes do show up and sometimes don't.
  6. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 19 Nov 2009 Link to this post

    Hello Marek Witczak,

    I'm afraid we could not be of much help unless we reproduce the issue on our side. It will be best if you can open a support ticket and send us a simple running project (incl. your custom skin, CSS, images, 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.

    Best wishes,
    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.
  7. Marek Witczak
    Marek Witczak avatar
    10 posts
    Member since:
    Oct 2009

    Posted 19 Nov 2009 Link to this post

    I've followed your suggestion and submitted support ticket (260270) with sample project. Let's see what'll happen next.
    Thanks for your help.
    Marek Witczak.
  8. Marek Witczak
    Marek Witczak avatar
    10 posts
    Member since:
    Oct 2009

    Posted 20 Nov 2009 Link to this post

    Issue has been resolved. Many thanks to Paul and Telerik team. The answer is to call javascript repaint function when showing RadTabStrip.
Back to Top