OrgChart - EntityDataSource

  • Davolio Nancy
    Occupation: CEO
    • Fuller Andrew
      Occupation: Team Lead
      • Leverling Janet
        Occupation: QA
      • Peacock Margaret
        Occupation: Designer
      • Buchanan Steven
        Occupation: Developer
      • Suyama Michael
        Occupation: Support Officer
Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB

This example shows how to codelessly bind RadOrgChart to EntityDataSource. You need to set DataFieldID and DataFieldParentID properties. Setting ItemFields of the RenderedFields section you can bind custom fields to Item element.

You may also see how to utilize Telerik OpenAccess ORM as a data access layer for our AJAX controls by visiting the OpenAccess ORM live demos here.

  • DefaultCS.aspx
<%@ Page Language="C#"  %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<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 no-bg">

        <telerik:RadOrgChart RenderMode="Lightweight" runat="server" ID="RadOrgChart1" DataSourceID="EntityDataSource1"
            DataTextField="FullName" DataFieldID="ID" DataFieldParentID="ParentID">
            <RenderedFields>
                <ItemFields>
                    <telerik:OrgChartRenderedField DataField="Occupation" Label="Occupation" />
                </ItemFields>
            </RenderedFields>
        </telerik:RadOrgChart>

    </div>

    <asp:EntityDataSource runat="server" ID="EntityDataSource1" ConnectionString="name=TelerikReadOnlyEntities"
        DefaultContainerName="TelerikReadOnlyEntities" EntitySetName="Employees">
    </asp:EntityDataSource>

    </form>
</body>
</html>

Support & Learning Resources

Find Assistance

Help Us Improve

Was this example helpful?