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

EntityDataSource

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>
<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