New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

DataSource Controls

XmlDataSource

  • Corporate
  • Services
  • Work
  • About us
  • Careers

SiteMapDataSource

  • Products
  • Consulting
  • Purchase
  • Support
  • Community
  • Company
  • UI for ASP.NET AJAX
  • UI for WinForms
  • UI for WPF
  • UI for Silverlight
  • Reporting
  • Data Access
  • Sitefinity ASP.NET CMS
  • Test Studio

ObjectDataSource

  • UI for ASP.NET Ajax
  • UI for Silverlight
  • Grid
  • Scheduler
  • Editor

EntityDataSource

  • cv
  • vcxvcvcv
RadTabStrip supports binding to various types of data sources, including declarative datasources.

Some of the declarative data sources are inherently hierarchical. These include SiteMapDataSource and XmlDataSource. When data-bound to these types of data sources, RadTabStrip automatically creates the tab hierarchy. There is no need to use the DataFieldID and DataFieldParentID properties.

RadTabStrip supports binding to an ObjectDataSource as well. In addition to the standard Tab properties (Text, Value, Navigate Url, etc.) that can be bound to the underlying business objects, the DataFieldID and DataFieldParentID properties can be specified, too. In this way, RadTabStrip will create a hierarchy of Tabs.

Still, the business objects should provide the data needed for the RadTabStrip to build the hierarchy. If the ParentID property of the business objects is of nullable or reference type, or is of value type (Integer, Guid, etc.), '0'/'Guid.Empty', then null values denote root Tabs.

In the demo is also demonstrated how to bind the RadTabStrip to an EntityDataSource. The DataFieldID and DataFieldParentID properties.

For more details on the aforementioned algorithm, please read the documentation topic - Binding to object-based data sources.

  • DefaultCS.aspx
  • DefaultCS.aspx.cs
  • styles.css
  • TabStrip.xml
<%@ Page AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" Inherits="TabStrip.Examples.PopulatingWithData.DeclarativeDataSources.DefaultCS"Language="c#"  %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div class="demo-container size-medium">
        <h2>XmlDataSource</h2>
        <telerik:RadTabStrip RenderMode="Lightweight" runat="server" DataTextField="Text" ID="RadTabStrip1" DataSourceID="XmlDataSource1"
            SelectedIndex="0" >
        </telerik:RadTabStrip>
    </div>
    <div class="demo-container size-medium">
        <h2>SiteMapDataSource</h2>
        <telerik:RadTabStrip RenderMode="Lightweight" runat="server" ID="RadTabStrip2" DataSourceID="SiteMapDataSource1" SelectedIndex="0"
            >
        </telerik:RadTabStrip>
    </div>
    <div class="demo-container size-medium">
        <h2>ObjectDataSource</h2>
        <telerik:RadTabStrip RenderMode="Lightweight" runat="server" DataTextField="Text" ID="RadTabStrip3" DataSourceID="ObjectDataSource1"
            DataFieldID="ID" DataFieldParentID="ParentID" SelectedIndex="0" >
        </telerik:RadTabStrip>
    </div>
    <div class="demo-container size-medium">
        <h2>EntityDataSource</h2>
        <telerik:RadTabStrip RenderMode="Lightweight" runat="server" DataTextField="Text" ID="RadTabStrip5" DataSourceID="EntityDataSource1"
            DataFieldID="ID" DataFieldParentID="ParentID" SelectedIndex="0" >
        </telerik:RadTabStrip>
    </div>
    <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="False"></asp:SiteMapDataSource>
    <asp:XmlDataSource runat="server" ID="XmlDataSource1" DataFile="TabStrip.xml" XPath="//TabCollection/Tab"></asp:XmlDataSource>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetSiteData"
        TypeName="Telerik.Web.Examples.SiteDataItem"></asp:ObjectDataSource>
    <asp:EntityDataSource runat="server" ID="EntityDataSource1" ConnectionString="name=TelerikReadWriteEntities"
        DefaultContainerName="TelerikReadWriteEntities" EntitySetName="Links">
    </asp:EntityDataSource>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance