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

Use different Template for Active Tab

1 Answer 36 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Albert
Top achievements
Rank 1
Albert asked on 14 Mar 2013, 06:14 PM
Does anyone know if there is a way to use a different template for the Active tab as opposed to the inactive tabs?

I have a button I want only on the active tab and I don't want it to show on the other tabs. Is there a way to do this? I'm not finding anything in the demo pages or the documentation.

Any help with this would be greatly appreciated.
Thanks.

1 Answer, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 19 Mar 2013, 04:52 PM
Hello Albert,

I can suggest you a slight different approach. You could use the PreRender event to loop through the RadTabs collection and manage the visibility of the buttons, which are nested in the disabled tabs. Consider the following approach :

protected void Page_PreRender(object sender, EventArgs e)
   {
       for (int i = 0; i < RadTabStrip1.Tabs.Count; i++)
       {
           RadTab tab = RadTabStrip1.Tabs[i];
           Button c = (Button)tab.FindControl("Button1");
           c.Visible = !tab.Enabled;
       }
   }



Regards,
Nencho
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
TabStrip
Asked by
Albert
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Share this question
or