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

[Solved] Scroll buttons not visible

7 Answers 163 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Marek Witczak
Top achievements
Rank 1
Marek Witczak asked on 16 Nov 2009, 11:03 AM

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

7 Answers, 1 is accepted

Sort by
0
Accepted
Paul
Telerik team
answered on 16 Nov 2009, 12:01 PM
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.
0
Marek Witczak
Top achievements
Rank 1
answered on 16 Nov 2009, 12:57 PM
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.
0
Paul
Telerik team
answered on 16 Nov 2009, 01:27 PM
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.
0
Marek Witczak
Top achievements
Rank 1
answered on 19 Nov 2009, 01:22 PM
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.
0
Paul
Telerik team
answered on 19 Nov 2009, 02:05 PM
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.
0
Marek Witczak
Top achievements
Rank 1
answered on 19 Nov 2009, 03:23 PM
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.
0
Marek Witczak
Top achievements
Rank 1
answered on 20 Nov 2009, 12:35 PM
Issue has been resolved. Many thanks to Paul and Telerik team. The answer is to call javascript repaint function when showing RadTabStrip.
Tags
TabStrip
Asked by
Marek Witczak
Top achievements
Rank 1
Answers by
Paul
Telerik team
Marek Witczak
Top achievements
Rank 1
Share this question
or