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

Disable Tabs

1 Answer 105 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Monique Smartt
Top achievements
Rank 1
Monique Smartt asked on 14 Nov 2008, 11:01 AM
I am trying to disable certain tabs server side. I am looping through all tabs and setting enabled to false. It does not affect the tabs. I can disable the entire tabstrip, which works fine. I am running this in page load

 
            RadTabStrip tabs = (RadTabStrip)Master.FindControl("tabstrip"); 
            foreach (RadTab tab in tabs.GetAllTabs()) 
            { 
                if (tab.Index > 0) 
                    tab.Enabled = false
            } 

Any help is greatly appreciated.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 17 Nov 2008, 10:02 AM
Hello Monique,

Try out the following code snippet to disable tabs in the RadTabStrip.
cs:
protected void Page_Load(object sender, EventArgs e)  
    {  
       RadTabStrip tabs = (RadTabStrip)Master.FindControl("tabstrip");  
       foreach (RadTab tab in tabs.GetAllTabs()) 
        { 
            if (tab != null && tab.Index > 0)            
               tab.Enabled = false
        }  
 
    }  

Thanks
Princy
Tags
TabStrip
Asked by
Monique Smartt
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or