<%@ Page EnableViewState="True" Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
    Inherits="_Default" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Untitled Page</title>
</head>
<body style="margin: 0px;">
    <form id="form1" runat="server">
        <div>
            <asp:ScriptManager ID="ScriptManager1" runat="server" />
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="RadGrid1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManager>
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px"
                Transparency="25" Width="75px">
                <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>'
                    style="border: 0px;" />
            </telerik:RadAjaxLoadingPanel>
            <telerik:RadGrid ID="RadGrid1" DataSourceID="AccessDataSource1" runat="server" Skin="Outlook"
                Width="95%" AutoGenerateColumns="False" PageSize="3" AllowPaging="True" GridLines="None"
                OnDetailTableDataBind="RadGrid1_DetailTableDataBind">
                <PagerStyle Mode="NumericPages"></PagerStyle>
                <MasterTableView DataSourceID="AccessDataSource1" DataKeyNames="EmployeeID" Width="100%">
                    <DetailTables>
                        <telerik:GridTableView Width="100%" AutoGenerateColumns="false" runat="server">
                            <Columns>
                                <telerik:GridTemplateColumn>
                                    <ItemTemplate>
                                        <telerik:RadGrid ID="SelfRefGrid" ShowHeader="true" runat="server" Skin="" Width="97%"
                                            GridLines="None" OnColumnCreated="SelfRefGrid_ColumnCreated" OnItemCreated="SelfRefGrid_ItemCreated"
                                            OnNeedDataSource="SelfRefGrid_NeedDataSource">
                                            <MasterTableView EnableNoRecordsTemplate="true" DataKeyNames="ID,ParentID" Width="100%">
                                                <SelfHierarchySettings ParentKeyName="ParentID" KeyName="ID" />
                                                <NoRecordsTemplate>
                                                </NoRecordsTemplate>
                                            </MasterTableView>
                                        </telerik:RadGrid>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                            </Columns>
                        </telerik:GridTableView>
                    </DetailTables>
                    <Columns>
                        <telerik:GridBoundColumn SortExpression="EmployeeID" HeaderText="EmployeeID" HeaderButtonType="TextButton"
                            DataField="EmployeeID" UniqueName="EmployeeID">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn SortExpression="FirstName" HeaderText="First name" HeaderButtonType="TextButton"
                            DataField="FirstName" UniqueName="FirstName">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn SortExpression="LastName" HeaderText="Last name" HeaderButtonType="TextButton"
                            DataField="LastName" UniqueName="LastName">
                        </telerik:GridBoundColumn>
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>
            <asp:AccessDataSource ID="AccessDataSource1" DataFile="~/App_Data/Nwind.mdb"
                SelectCommand="SELECT EmployeeID, FirstName, LastName FROM Employees" runat="server">
            </asp:AccessDataSource>
        </div>
    </form>
</body>
</html>
