RabRibbonBar Tab Visible

4 posts, 0 answers
  1. Jen
    Jen avatar
    21 posts
    Member since:
    Oct 2008

    Posted 29 Mar 2011 Link to this post

    Is it possible to hide a tab from code (c#).  I don't see a visibility property.
  2. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 30 Mar 2011 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jen
    Jen avatar
    21 posts
    Member since:
    Oct 2008

    Posted 30 Mar 2011 Link to this post

    ok, so I try that ( Snippet
    RadTabStrip radTabStripMainNav = (RadTabStrip)RadRibbonBarMainNav.FindControl(RadRibbonBarMainNav.ID + "_TabStrip");)
    
    And the count of tabs in the tab strip is zero.
  5. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 05 Apr 2011 Link to this post

    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
Back to Top