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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
    <title>Test</title>
    <script type="text/javascript">
    </script>
</head>
<body>
    <form id="Form1" runat="server">
        <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
        <asp:Button Text="save"  OnClick="Unnamed_Click" runat="server" />
        <telerik:RadGrid ID="RadGrid1" ShowStatusBar="true"
        DataSourceID="SqlDataSource1" runat="server" AutoGenerateColumns="False" PageSize="7"
        AllowSorting="True" AllowMultiRowSelection="False" AllowPaging="True" GridLines="None">
        <PagerStyle Mode="NumericPages"></PagerStyle>
        <MasterTableView EnableHierarchyExpandAll="true" HierarchyLoadMode="Client" DataSourceID="SqlDataSource1" DataKeyNames="CustomerID" AllowMultiColumnSorting="True">
            <DetailTables>
                <telerik:GridTableView EnableHierarchyExpandAll="true" DataKeyNames="OrderID" DataSourceID="SqlDataSource2" Width="100%"
                    runat="server">
                    <ParentTableRelation>
                        <telerik:GridRelationFields DetailKeyField="CustomerID" MasterKeyField="CustomerID">
                        </telerik:GridRelationFields>
                    </ParentTableRelation>
                    <Columns>
                        <telerik:GridTemplateColumn UniqueName="Column1">
                            <ItemTemplate>
                            <asp:TextBox runat="server" ID="RadTextBox1">
                            </asp:TextBox>
                            <telerik:radcombobox ID="ChildCombo"  runat="server">
                                <Items>
                                    <telerik:RadComboBoxItem Text="1" Value="1" />
                                    <telerik:RadComboBoxItem Text="2" Value="2" />
                                    <telerik:RadComboBoxItem Text="3" Value="3" />
                                    <telerik:RadComboBoxItem Text="4" Value="4" />
                                    <telerik:RadComboBoxItem Text="5" Value="5" />
                                </Items>
                            </telerik:radcombobox>
                                </ItemTemplate>
                        </telerik:GridTemplateColumn>
                    </Columns>
            
                </telerik:GridTableView>
            </DetailTables>
            <Columns>
                <telerik:GridTemplateColumn UniqueName="MainTemplateColumn">
                            <ItemTemplate>
                            <asp:Label Text='<%#Eval("CustomerID") %>' ID="IDLabel" runat="server"></asp:Label>
                            <telerik:radcombobox ID="Radcombobox1"  runat="server">
                                <Items>
                                    <telerik:RadComboBoxItem Text="1" Value="1" />
                                    <telerik:RadComboBoxItem Text="2" Value="2" />
                                    <telerik:RadComboBoxItem Text="3" Value="3" />
                                    <telerik:RadComboBoxItem Text="4" Value="4" />
                                    <telerik:RadComboBoxItem Text="5" Value="5" />
                                </Items>
                            </telerik:radcombobox>
                                </ItemTemplate>
                        </telerik:GridTemplateColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
    <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
        ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM Customers"
        runat="server"></asp:SqlDataSource>
          <asp:SqlDataSource ID="SqlDataSource2" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
        ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM Orders Where CustomerID = @CustomerID"
        runat="server">
        <SelectParameters>
            <asp:SessionParameter Name="CustomerID" SessionField="CustomerID" Type="string">
            </asp:SessionParameter>
        </SelectParameters>
    </asp:SqlDataSource>
    </form>
</body>
</html>
