New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

Migrating From RadTabStrip Classic to RadTabStrip for ASP.NET Ajax

To migrate a Web application from RadTabStrip "Classic" to RadTabStrip "for ASP.NET Ajax" you need to follow these steps:

  1. Make sure you have installed ASP.NET AJAX. Info can be found at http://ajax.asp.net/docs/InstallingASPNETAJAX.aspx

  2. If your web application is not using ASP.NET AJAX you need to configure it to do so. Detailed instructions can be found at http://ajax.asp.net/docs/ConfiguringASPNETAJAX.aspx (Look for the topic called "Adding ASP.NET AJAX Configuration Elements to an Existing Web Site".)

  3. Add a ScriptManager control to the page (or user control) in which you want to add any RadControls "for ASP.NET Ajax". <asp:ScriptManager ID="ScriptManager1" runat="server" />If your page is a content page you can add the ScriptManager control in your master page. For further details about the ScriptManager control, see http://ajax.asp.net/docs/overview/ScriptManagerOverview.aspx.

  4. Drag and drop a control from the RadControls "for ASP.NET Ajax" package or manually copy the Telerik.Web.UI.dll in the Bin folder.

  5. Replace the classic RadTabStrip directive<%@ Register TagPrefix="rad" Namespace="Telerik.WebControls" Assembly="RadTabStrip.NET2" %>with the new one of RadTabStrip for ASP.NET Ajax:<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

Differences between RadTabStrip "classic" and RadTabStrip for ASP.NET Ajax

RadTabStrip for ASP.NET Ajax has changed: All of the client-side properties and methods' names have changed along with several server API changes. Some properties and methods have been completely removed, while new ones have been added. The control's client-side API is not backward-compatible with RadTabStrip Classic edition. All the changes included in the control are listed below:

Server-side API changes

In the RadTabStrip server-side API, a few properties have been removed or renamed and a few type names have changed:

Type names

A number of type names have changed in order to comply with the naming convention of the other navigation controls. The following table lists the type name changes:

 

RadTabStrip ClassicRadTabStrip for ASP.NET Ajax
TabRadTab
PageViewRadPageView
TabCollectionRadTabCollection
RadTabStripOrientationTabStripOrientationHorizontalTopToBottom renamed to HorizontalTopHorizontalBottomToTop renamed to HorozintalBottomVerticalLeftToRight renamed to VerticalLeftVerticalRightToLeft renamed to VerticalRight
ScrollButtonsPositionTabStripScrollButtonsPosition
TabStripEventArgsRadTabStripEventArgs
TabStripEventHandlerRadTabStripEventHandler
PageViewItemCreatedDelegateRadMultiPageEventHandlerIts arguments are also different: public delegate void RadTabStripEventHandler(object sender, RadTabStripEventArgs e)

RadTabStrip

The following table lists the changes to the RadTabStrip object:

 

RadTabStrip ClassicRadTabStrip for ASP.NET Ajax
Properties
EnableImmediateNavigationRemoved
InnerMostSelectedTabRenamed to InnermostSelectedTab
ReorderTabRowsRenamed to ReorderTabsOnSelect
OnClientTabEnabledRemoved
OnClientTabDisabledRemoved
Methods
GetAllTabsReturn type changed to IList

RadTab Class

The following table lists the changes to the RadTab (formerly Tab) object:

 

RadTabStrip ClassicRadTabStrip for ASP.NET Ajax
Properties
ImageOverUrlRenamed to HoveredImageUrl
IDReserved for internal use only. Cannot be user-defined.

RadMultiPage Class

The following table lists the changes to the RadMultiPage object:

 

RadTabStrip ClassicRadTabStrip for ASP.NET Ajax
Properties
AutoScrollBarsScrollBars (of type PageViewScrollBars)
Events
PageViewItemCreatedPageViewCreated

Client-side API changes

Due to the migration of the RadTabStrip control to the ASP.NET Ajax framework and to the Telerik.Web.UI suite, the client-side API is completely changed to match the naming convention of the new framework.

RadTabStrip Class

The following table lists the changes to the RadTabStrip client-side object:

 

RadTabStrip ClassicRadTabStrip for ASP.NET Ajax
Methods
Disable()disable() or set_enabled(false)
Enable()enable() or set_enabled(true)
GetAllTabs()get_allTabs()
FindTabByUrl()findTabByUrl()
FindTabByText()findTabByText()
FindTabById()removed: tab ID is not rendered to preserve output.
FindTabByValue()findTabByValue()
AttachEvent()get_events().addHandler can be used instead
DetachEvent()get_events().removeHandler can be used instead
Properties
IDget_id()
DomElementget_element()
Tabsget_tabs()The returned value is no longer Array. It is Telerik.Web.UI.RadTabCollection
JavaScript
for (var i=0; i<tabstrip.get_tabs().get_count();i++)
{
  var tab = tabstrip.get_tabs().getTab(i);
  alert(tab.get_text());
}	

 

AllTabsget_allTabs()
SelectedTabget_selectedTab()
SelectedIndexget_selectedIndex()
Enabledget_enabled()

RadTab Class

The following table lists the changes to the RadTab client-side object:

 

RadTabStrip ClassicRadTabStrip for ASP.NET Ajax
Methods
Disable()disable() or set_enabled(false)
Enable()enable() or set_enabled(true)
Select()select() or set_selected(true)
UnSelect()unselect() or set_selected(false)
SelectParents()selectParents()
Click()click()
SetCssClass()set_cssClass()
SetDisabledCssClass()set_disabledCssClass()
SetSelectedCssClass()set_selectedCssClass()
SetText()set_text()
Properties
DomElementget_element()
ImageDomElementget_imageElement()
ChildStripDomElementget_childListElement()
Tabsget_tabs()The returned value is no longer Array. It is Telerik.Web.UI.RadTabCollection
SelectedTabget_selectedTab()
SelectedIndexget_selectedIndex()
Parentget_parent()
TabStripget_tabStrip()
Selectedget_selected()
Enabledget_enabled()
Indexget_index()
GlobalIndexremoved
Textget_text()
Valueget_value()
DepthLevelget_level()
get_attributes() – returns Telerik.Web.UI.AttributeCollection of custom attributes associated with the tab

RadTabCollection class (new)

The following table lists the methods of the new RadTabCollection client-side object:

 

MethodDescription
Methods
add()Adds a tab
insert()Inserts a tab
remove()Removes a tab
clear()Clears the tabs
getTab()Gets a tab from the Tabs collection
indexOf()Returns the index of a tab
removeAt()Removes a tab at a specified index
get_count()Returns the count of the tabs
trackChanges()Indicates the beginning of client-side changes that are meant to be persisted at the server.
commitChanges()Indicates the end of client-side changes that are meant to be persisted at the server.