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

RabRibbonBar Tab Visible

3 Answers 90 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Jen
Top achievements
Rank 1
Jen asked on 29 Mar 2011, 02:53 PM
Is it possible to hide a tab from code (c#).  I don't see a visibility property.

3 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 30 Mar 2011, 07:12 AM
Hello Jen,

Currently the Tabs are accessible only indirectly. They belong to a nested RadTabStrip, which you can access in this way:

protected void Page_Load(object sender, EventArgs e)
 {
     var tabStrip = RadRibbonBar1.FindControl(RadRibbonBar1.ID + "_TabStrip") as RadTabStrip;
  
    //tabStrip.Tabs
 }

We are working on this and will have it resolved for the Service Pack at the latest.


All the best,
Simon
the Telerik team
0
Jen
Top achievements
Rank 1
answered on 30 Mar 2011, 02:21 PM
ok, so I try that (
RadTabStrip radTabStripMainNav = (RadTabStrip)RadRibbonBarMainNav.FindControl(RadRibbonBarMainNav.ID + "_TabStrip");)

And the count of tabs in the tab strip is zero.
0
Simon
Telerik team
answered on 05 Apr 2011, 12:06 PM
Hello Jen,

Yes, you are right. I have mislead you. Only the TabStrip is available before PreRender. The Tabs are added just after PreRender, so you can use the same RadRibbonBar event:
protected override void OnLoad(System.EventArgs e)
{
    base.OnLoad(e);
 
    RadRibbonBar1.PreRender += new System.EventHandler(RadRibbonBar1_PreRender);
}
 
protected void RadRibbonBar1_PreRender(object sender, System.EventArgs e)
{
    var tabStrip = RadRibbonBar1.FindControl(RadRibbonBar1.ID + "_TabStrip") as RadTabStrip;
 
    //tabStrip.Tabs
}

Please excuse for my mistake and let me know how it goes with the code above.

Greetings,
Simon
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
RibbonBar
Asked by
Jen
Top achievements
Rank 1
Answers by
Simon
Telerik team
Jen
Top achievements
Rank 1
Share this question
or