Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / web / ASP.NET

Enable Disable all Tabs inside Telerik RadTabStrip

8 Sep 2014CPOL 17.5K  
We will explore the JavaScript code, by which we can easily Enable or Disable all the Tabs inside a Telerik RadTabStrip.

This article appears in the Third Party Products and Tools section. Articles in this section are for the members only and must not be used to promote or advertise products in any way, shape or form. Please report any spam or advertising.

We will explore the JavaScript code, by which we can easily Enable or Disable all the Tabs inside a Telerik RadTabStrip.

Read the comments inside the code blocks to know how the code works.

Enable All Tabs

JavaScript
function EnableAllTabs(){
    // Get the Tab Strip.
    var tabStrip = $find('<%= yourTabStripID.ClientID >');
    
    // Get all the Tabs.
    var tabs = tabStrip.get_tabs();

    // Now loop through all the Tabs and Enable one by one.
    for(var i = 0; i < tabStrip.get_allTabs().length; i++){
        tabs.getTab(i).enable();
    }
}

Disable All Tabs

JavaScript
function DisableAllTabs(){
    // Get the Tab Strip.
    var tabStrip = $find('<%= yourTabStripID.ClientID >');
    
    // Get all the Tabs.
    var tabs = tabStrip.get_tabs();

    // Now loop through all the Tabs and Disable one by one.
    for(var i = 0; i < tabStrip.get_allTabs().length; i++){
        tabs.getTab(i).disable();
    }
}

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)