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

Several TabStrip issues

1 Answer 105 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Jos
Top achievements
Rank 1
Jos asked on 26 Aug 2008, 07:06 AM

We are building a very dynamic Ajax web application using Telerik Tabstrib.

<telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0" ontabclick="RadTabStrip1_TabClick" ScrollChildren="True" ScrollButtonsPosition="Middle" onclienttabselecting="onTabSelecting" OnClientLoad="SetScrollPosition"></telerik:RadTabStrip>

Our tabs are build dynamically by code on the server using a Template. 

    public void InstantiateIn(System.Web.UI.Control container)
{        
    Label label1 = new Label();
    label1.ID = "ItemLabel";
    label1.Text = "Text";
    label1.Font.Size = 10;
    label1.Font.Bold = true;
    label1.DataBinding += new EventHandler(label1_DataBinding);

    Image image1 = new Image();
    image1.ID = "ItemImage";
    image1.AlternateText = "Delete";
    image1.ImageUrl = @"~\images\tabs\delete.gif";

    image1.DataBinding += new EventHandler(image1_DataBinding);

    container.Controls.Add(label1);            
    container.Controls.Add(image1);
}

    void image1_DataBinding(object sender, EventArgs e)
    {
       Image target = (Image)sender;
       RadTab tab = (RadTab)target.BindingContainer;
        
        string
tabText = tab.Text;        

        if (tabText == "+")
            target.CssClass = "btnHidden";
        else
        {
            target.CssClass = "btnVisible";
            t
arget.Attributes.Add("onclick", "deleteTab(" + tab.Value + ");");
        }
    } 

    private void label1_DataBinding(object sender, EventArgs e)
    
{     
        Label target = (Label)sender;
        RadTab tab = (RadTab)target.BindingContainer;
        string tabText = (string)DataBinder.Eval(tab, "Text");
        target.Text = tabText;
}

The first problem we encountered using a template is that we lost the default skin. For the temporary we now use RadTabStrip1.Skin = "Outlook"; How can we get the default skin back?

When the aspx page is rendered the result looks OK

We added some javascript code to delete tabs and with IE7 is works reasonably OK. But with FireFox nothing works.  No response when clicking on tabs of the delete image. Is this a common thing?

Third thing: As you see the image, the delete cross id beyond its scroll boundaries. Do you have something to fix this?

1 Answer, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 26 Aug 2008, 12:00 PM
Hi Jos,

Unfortunately, the provided information does not help us much in reproducing the error. 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.

Kind regards,
Paul
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
TabStrip
Asked by
Jos
Top achievements
Rank 1
Answers by
Paul
Telerik team
Share this question
or