<%@ Page Language="C#" %>

<%@ 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">

<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
        <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <div>
            <asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="DataClassesDataContext"
                TableName="Customers" Select="new (CustomerID, CompanyName, ContactName, ContactTitle, Address, City)" />
            <asp:LinqDataSource ID="LinqDataSource2" runat="server" ContextTypeName="DataClassesDataContext"
                TableName="Orders" Select="new (OrderID, CustomerID, EmployeeID, OrderDate, RequiredDate, ShippedDate)" Where="CustomerID == @CustomerID">
                <WhereParameters>
                    <asp:Parameter Name="CustomerID" Type="String" />
                </WhereParameters>
            </asp:LinqDataSource>
            <telerik:RadGrid ID="RadGrid1" Skin="Vista" AllowPaging="True" DataSourceID="LinqDataSource1"
                runat="server" GridLines="None" AllowFilteringByColumn="True" AllowSorting="True"
                ShowGroupPanel="True">
                <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True" ReorderColumnsOnClient="True">
                    <Selecting AllowRowSelect="True" />
                </ClientSettings>
                <MasterTableView DataKeyNames="CustomerID">
                    <DetailTables>
                        <telerik:GridTableView DataSourceID="LinqDataSource2" Width="100%" runat="server">
                            <ParentTableRelation>
                                <telerik:GridRelationFields MasterKeyField="CustomerID" DetailKeyField="CustomerID" />
                            </ParentTableRelation>
                        </telerik:GridTableView>
                    </DetailTables>
                </MasterTableView>
            </telerik:RadGrid>
        </div>
    </form>
</body>
</html>
